HTML - After 'submit' How To Get Page To Appear Again
Hi All
I need a little help with a <form> I'm trying to create. This is my code.. Code: <h3>Add New Image</h3></br> <form action="upload.php" method="post"> Image Description:<br/> <!--<input type="text" name="imageDescription"/><br/>--> <textarea cols="50" rows="4" name="imageDescription"> </textarea><br/> Path:<br/> <input type="file" name="path"/><br/> <br/><br/> <input type="submit" value="Add New Image"/> </form> When I press the 'Submit' button, a blank page appears. What I would like to happen is for this page to appear again so I can use the form again but I don't know how to do this. Can anyone lend any advice or help? Thank you. I did have some php in this but I took it out as this is a html forum but if it helps, I'll put it back in, just let me know Similar Tutorialshow can i submit this form to my email can any1 one edit it and fix it for me please thank you make sure it works iv tried but it don't work cuz i cnt name the form Code: <script> function validate() { var at=document.getElementById("email").value.indexOf("@" && ".") var age=document.getElementById("age").value var fname=document.getElementById("fname").value var lname=document.getElementById("lname").value var address=document.getElementById("address").value var header=document.getElementById("header").value var footer=document.getElementById("footer").value submitOK="true" if (fname.length<2) { alert("Please Enter Your Name") submitOK="false" } if (fname.length>12) { alert("Please Enter Your Name") submitOK="false" } if (lname.length<2) { alert("Please Enter Your Last Name") submitOK="false" } if (lname.length>12) { alert("Please Enter Your Last Name") submitOK="false" } if (isNaN(age)||age<18||age>100) { alert("You have to be over 18 to place a online Order") submitOK="false" } if (address.length<25) { alert("Please Enter a valid Address in the Following Format\n\n House/Flat Number\n\n Name of Road/Street\n\n Post Code\n\n Town and the City") submitOK="false" } if (at==-1) { alert("Please Retype Your Email, The Email you Entered is not Valid") submitOK="false" } if (header.length<3) { alert("Please Enter Your Area Phone Code") submitOK="false" } if (footer.length<8) { alert("Please Enter Your Phone Number") submitOK="false" } if (submitOK=="false") { return false } function shaz() { alert("Are You Sure you want to Reset the Whole Page") } } </script> <body> <BODY BACKGROUND="http://img452.imageshack.us/img452/9413/wallpaperox6.jpg" BGCOLOR="white" TEXT="blue" > <center><IMG SRC="contact.gif"> </center> <form action="choice.html" onsubmit="return validate()"> Name (Max 9 chararcters): <input type="text" id="fname" size="20"><br /> <p> Last Name (Max 9 chararcters): <input type="text" id="lname" size="20"><br /> <p> Age (Over 18's Only ): <input type="text" id="age" size="20"><br /> <p> Address:<br><textarea id="address" cols="40" rows="5" ></textarea> <p> E-mail: <input type="text" id="email" size="20"><br /> <p> Primary telephone: (*<input type="text" id="header" size="2" maxlength="4">) <input type="text" id="footer" size="7" maxlength="8"> <p> Card Type: <select id="cardtype" onchange='alert("You Have selected "+ cardtype.value)'><br> <option value = "Home">Home </option> <option value = "Work">Work </option> </select> <p> <input type="submit" value="Click here To Continue" onClick="validate()"> <body> <form onreset="shaz()"> <input type="Reset"> </body> </html> I have a php contact page that when people submit there message it goes to another page saying "thank you, your message has been sent" What I would like to do is have this thank you page pop up in a small 400 x 320 window and refresh the orignal page to my home page. Can anyone please help me do this? I do not know how to go about doing this. Thank you. I need a basic form to submit for a html web page. Can you provide one with a two seperate fields, one text area, and a submit button? Thanks Hello all, I am trying to copy a page over to my domain (with permission) and even though it looks ok, the submit buttons / field areas are not working properly. Here is the page I am trying to get working. http://www.ldodds.com/foaf/foaf-a-matic I have grabbed the appropriate .js files and everything in MY header is fine, but like I said.. I can not get the buttons to actually take the data from the fields and spit out the code in the box provided. Any help would be great, thanks! Hi all, I'm trying to find a way to have my webpage scroll to the bottom automatically after the script: document.form1.submit() is called. I need to run the function/refresh in order to reload some different data into part of the page, but after the refresh the position of the page is always at the top... making the user have scroll down again. I could set some anchors or use window.scroll(0.500); on the page load, but i only want it to scroll down if that function of form1.submit() is called - and thats only called once the page has already loaded for the first time. So the first time a user goes to the page, it loads normally at the top of the page. Then they scroll down themselves and select an option. Once the select an option, the form1.submit() is called and the page refreshes with new data in it but is still at the top. Is what I want possible? Thanks, Mike Hi all, how can i upload a file and when i click the submit button i go automatically to other web page. I am using some code that uploads the file perfectly, but i can't get a way to go to other page when i click the submit button. If someone can help me giving me an example of how to do that, or tell me what to change in my code i'll appreciate any kind of help. Here is my code: PHP Code: <?php function error($errorMsg) { ?> <script> alert("<?php echo $errorMsg;?>"); </script> <?php } global $folder; $folder = "uploaded"; if(!is_dir($folder)) if(!mkdir($folder)) { error("Can't, neither, access, nor create, the upload folder"); die(); } ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <style> body { background-color:#000000; } </style> <title>Upload</title> </head> <body> <center><h1><font color = "#FFFFFF" > Upload </font></h1></center> <?php function mainPage() { ?> <iframe style="display:none" name="fileUploader"></iframe> <form method="POST" target="fileUploader" enctype="multipart/form-data" action="?action=fileUploader"> <div><input name="file" type="file" STYLE="color:#FFFFFF; size="60"></div> <input type="submit" value="Upload" > </form> <?php } function fileUploader() { global $folder; function storeFile($folder,$tmpFileName,$fileName) { if(!is_uploaded_file($tmpFileName)) { error("Invalid file"); return; } if(!move_uploaded_file($tmpFileName, $folder . "/" . $fileName )) { error("Can't move uploaded file to destination"); return; } } foreach ($_FILES as $file) storeFile("uploaded",$file["tmp_name"],$file["name"]); } $actions = array("fileUploader" => 1,"fileLoader"=> 1); if (!isset($_GET['action'])) { //If not isset -> set with dumy value $_GET['action'] = "undefine"; } $action = $_GET["action"]; if($actions[$action]) $action(); else mainPage(); ?> </body> </html> Using below script after clicking the button it will reload the page and starting the application I want people go to anchor link location after clicking the submit button, for example go to the bottom of the page because the program is in the bottom of the page how to do that guys please help Code: echo '<form action="" id="frm_chat" method="post"><fieldset id="fieldset_chat"><legend>Chat</legend><div>'; echo $err_msg; echo "<label>Nick: </label>".$txt_nick->getHtml()."<br />"; echo "<label>Server: </label>".$ddl_server->getHtml()." or ".$txt_server->getHtml()."<br />"; echo "<label>Channel: </label>".$ddl_channel->getHtml()." or ".$txt_channel->getHtml()."<br />"; echo ' <input type="submit" class="btn" name="btn_chat" value="Chat Now"/></div></fieldset></form>'; My page contains several iframes and each contains a form. In IE (but not in FF), when I submit a form, the action page is shown in a new window. How can I make it so the action page is instead loaded inside the iframe? hi again i need some help how i can do auto submit in the loop (for) i need every time setvalue to input text and submit() <input type="text" name="text" id="Tes" size="12" /> i have this code but it doesnt work <script language =javascript > for ( f = 0 ; f<=100 ; f++ ) { document .getElementById ("Tes").value = f ; document .forms ["lname"].submit(); } </script> so please ned some help I currently have a set of buttons which change colour and use a gradient using css. eg: Code: <input class="button yellow small" name="previous" type="submit" value="previous" /> What i want is to have the word previous be replaced with an image of an arrow. I found a website which illustrated how to achieve putting an image on a button using the button tage: http://neozilon.com/html/set-image-as-a-submit-button However, using the button tags in the past has resulted in odd behaviours as some browsers read the button tag differently to others.... So, is it possible to put an image on the input/submit tag and still have it depress properly when pressed? I am to this forum and to html. In fact, i am learning html as i go. I am currently encountering a problem a submit.php When visitors to the page sign up they get an email with the requested info, however, I do not get an email with their info. I providing the code on here for my submit.php. Please help me identify and fix the problem. Thanks Don S. http://www.stocktraderspress.com/trial.php http://www.stocktraderspress.com/submit.php PHP Code: /******************************** * Send the user email message... ********************************/ $mail = new PHPMailer(); $mail->Host = "mail.stocktraderspress.com"; // Set the mail hostname here $mail->Mailer = "smtp"; $mail->SMTPAuth = true; $mail->Username = "stocktraderspress@stocktraderspress.com"; // Set the email account username here $mail->Password = ""; // Set the email account password here $mail->From = 'info@stocktraderspress.com'; $mail->FromName = 'STP Website'; $mail->AddAddress($_POST['em']); $mail->AddBCC; $mail->WordWrap = 100; $mail->Subject = 'Thank you for your interest in Stock Traders Press'; $mail->Body = $body; $mail->IsHTML(true); $mail->AltBody = @strip_tags($body); // This is a 'text-only' version of the message... if(!$mail->Send()) { echo "Mailer error: ". $mail->ErrorInfo; //exit; } /********************************* * Create database message body... *********************************/ $text = "<p>Email: ".$_POST['em']."<br>"; $text .= "First Name: ".$_POST['fn']."<br>"; $text .= "Last Name: ".$_POST['ln']."<br>"; $text .= "Phone: ".$_POST['ph']."<br>"; $text .= "Address Line 1: ".$_POST['ad']."<br>"; $text .= "Address Line 2: ".$_POST['ap']."<br>"; $text .= "City: ".$_POST['ct']."<br>"; $text .= "State / Province: ".$_POST['st']."<br>"; $text .= "Country: ".$_POST['cn']."<br>"; $text .= "Selected Offers: ".@implode(',',$_POST['selected_offers'])."<br>"; $text .= "Years In Market ".$_POST['years']."<br>"; $text .= "Portfolio Size: ".$_POST['portfolio']."<br>"; $text .= "Broker Type: ".$_POST['broker']."v"; $text .= "Mailing List: ".$_POST['yes']."<br>"; /******************************* * Create database email... *******************************/ $mail = new PHPMailer(); $mail->Host = 'mail.stocktraderspress.com'; // Set the mail hostname here $mail->Mailer = 'smtp'; $mail->WordWrap = 100; $mail->SMTPAuth = true; $mail->IsHTML(true); $mail->Username = 'stocktraderspress@stocktraderspress.com'; // Set the email account username here $mail->Password = 'stock###'; // Set the email account password here $mail->From = 'info@stocktraderspress.com'; $mail->FromName = 'STP Website'; $mail->AddAddress('clientservices@stocktraderspress.com'); $mail->AddAddress('chriscastaldo@aol.com'); $mail->AddBCC(''); $mail->AddReplyTo('clientservices@stocktraderspress.com'); $mail->Subject = 'Thank you for your interest in Stock Traders Press'; $mail->Body = 'The following request has been submitted'.$text; $mail->AltBody = @strip_tags($body); // This is a 'text-only' version of the message... if(!$mail->Send()) { //echo "Mailer error: ". $mail->ErrorInfo; //exit; } Hey there guys, my first time... Site looks pretty good. Well my problem is that I don't know how to make a submit button that sends certain information. For example: I make a button on a page ("<input type="submit" name="B1" value="Login">) but i don't know how to make a hyperlink for it. At the same time i want the hyperlink to be: "username:password@www.site.com" Where user name is, I want a the text box text. (<input type="text" size="22" name="T1">) and for the password the other text box 2. So if textbox 1 is "john" and textbox 2 is "long", when the submit button is pressed, the hyperlink jumps to: "john:long@www.site.com" Thanks, I really hope you guys could help me out.... Cool Ahh this will probably be an easy question for someone to answer and I feel silly asking it. But anyways, I am integrating a site with php and I am not as fluent in html as the former. I need to just have a text that says login and not the actual button. Here is what I have been using <input type="submit" name="wp-submit" id="wp-submit" value="<?php _e('Register'); ?>" /> , how would I get it to just be text? Thanks for answering noob questions I have a job application page on my client's site that needs to be submited, sent to an email adress and then redirected to a 'thank you' page. The format and look of the page appears to be great, but when you hit the 'submit' button on the page, the error message "Method Not Allowed: The requested method POST is not allowed for the URL /job.htm." Apparently, this site's address was recently changed and the submission action was lost somewhere in transfer. The code is below, but if anyone is willing to help, it would be greatly appreciated. THANK YOU! <FORM METHOD="POST" ACTION="http://www....job.htm"><INPUT TYPE="hidden" NAME="recipient" VALUE="email address"> <INPUT TYPE="hidden" NAME="subject" VALUE="Job Application info"><INPUT TYPE="hidden" NAME="redirect" VALUE="http://www.....thanks.htm"> Hi, I want to create a page that has a form designed to look like a form that members have to now fill out manually (eg registration for an event). When I design the html page with the form submit on it, how can I make the emailed form look like the html page that the user saw instead of just lines of data? This is so people who recieve the form via email, it will look like the original form. Thanks Jaden I am designing a site for avaition photos that I have taken. What I want to do is have people who have had pictures taken of their aircraft to find the pictures and discretley release them for publication. The 'hard part' is taking the aircraft registry from a submit feild and returning an apropriate result. What I want to have happen is that if the user submits a registry that I have, they are presented with a page that they can fill out their information confirming that they are who they say they are and that the photo can be released. And if they are not in my list they get a 'sorry photo(s) not found' The question is can I do this without ay scripting or a database? IE If the user has the registration, have it point to a 'submittedregistration.html' file? Thanks for your help all!! i am trying to incorporate a simple submit button with a pop-up window. i am struggling because i can get one or the other to work properly, but not both: popup and submit. any ideas would be greatly appreciated! here's what i'm looking at. </div> </fieldset> <a href="http://www.mycotorra.com/images/almostfinished.png" id="mc_embed_close" class="mc_embed_close" style="display: none;">Close</a> <div style="z-index: 1; width: 160px; height: 42px; position: absolute; top: 70px; left: -96px"> <input type="image" value="Subscribe" name="Sign up now" id="mc-embedded-subscribe" class="style81" style="clear: both;display: block; margin-right: 0;" height="44" src="http://www.mycotorra.com/images/sign%20up%20now%20button.png" width="162"></div> I need help with this html, i need the submit button to email the forms to: mariamarias@hotmail.com instead of redirecting you to another webpage Please help me!!!!!!!!!!!!!!!!!!! Code: Please enter your account number and your password.<BR> <A HREF="?subtopic=createaccount">Create an account </A> if you do not have one yet.<BR><BR> <TABLE WIDTH=100% BORDER=0 CELLSPACING=1 CELLPADDING=4> <TR><TD BGCOLOR="#505050" CLASS=white><B>Account Login</B></TD></TR> <TR><TD BGCOLOR="#D4C0A1"> <FORM ACTION="https://secure.tibia.com/account/?subtopic=accountmanagement" METHOD=post> <TABLE BORDER=0 CELLPADDING=1> <TR><TD>Account number:</TD><TD><INPUT TYPE=password NAME="ACCOUNTLOGIN_ACCOUNTID" SIZE=10 MAXLENGTH=10></TD></TR> <TR><TD>Password:</TD><TD><INPUT TYPE=password NAME="ACCOUNTLOGIN_PASSWORD" SIZE=30 MAXLENGTH=29></TD></TR> </TABLE> </TD></TR> </TABLE> <BR> <TABLE BORDER=0 WIDTH=100%> <TR><TD ALIGN=center><IMG SRC="https://static.tibia.com/images/global/general/blank.gif" WIDTH=70 HEIGHT=1 BORDER=0><BR> </TD><TD ALIGN=center> <TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0><TR><TD><INPUT TYPE=image NAME="Submit" SRC="https://static.tibia.com/images/global/buttons/sbutton_submit.gif" BORDER=0 WIDTH=120 HEIGHT=18></TD></TR></FORM></TABLE> </TD><TD ALIGN=center> <TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0><FORM ACTION=https://secure.tibia.com/account/?subtopic=lostaccount METHOD=post><TR><TD><INPUT TYPE=image NAME="Account lost?" ALT="Account lost?" SRC="https://static.tibia.com/images/global/buttons/sbutton_accountlost.gif" BORDER=0 WIDTH=120 HEIGHT=18></TD></TR></FORM></TABLE> </TD><TD ALIGN=center> Hi, how can I submit the selected value of my component through php ? This code doesn't work: <div name="palette" dojoType="dijit.ColorPalette"> <script type="dojo/method" event="onChange" args="selectedColor"> console.log(selectedColor); </script> </div> ... ... $palette = filter_var($_POST['palette'], FILTER_SANITIZE_STRING); I'm looking for a way that I can allow users, that visit my website, to submit a graphic (.jpg,.gif,etc) either to my inbox or a specified folder on the server. Is this possible? I plan on using it under the "Your Screens" link. - http://www.v0dk4.com/main.shtml |