HTML - Clear Field On Submit
Is there a simple way to clear a field on submit? I have a very simple form with a single field, an email address. When I hit submit, I want the input that has already been entered to clear.
<label for="email">E-mail: </label> <input type="text" name="email" id="email" onfocus="this.value = '';" value="<?php get_data("email"); ?>" /><br /> <input type="submit" name="submit" id="submit" value="Submit" <?php if (isset($disable) && $disable === true) echo ' disabled="disabled"'; ?> /> Thanks! Similar TutorialsI have a web page that I had to convert from a .psd file to an html and I'm not able to center a submit button and the text field next to it. I've tried various alignments but I'm also limited by what I can do because when you convert from .psd to html the entire page is one form. I don't have an external link but I'm able to provide html if necessary. Can someone please take a look at my code and offer some suggestions? Thank you Doug Ok, basically here is the run down of what I am looking for this script to do. Code: http://www.thisisjustanexamplesite.com/stats=XXXX-XXXX-XXXX (X's representing numbers) All I want is the webpage to just show a text field and a submit button. So when the user puts in the numbers in the text field and hits submit, it automatically will put the numbers he put into the text field on the end of that link mentioned above and then take them there. I'm thinking it should just be simple HTML but possbily PHP maybe, not sure. Any help would be appreciated! Hi, after testing my site in IE8 I've discovered a large bug with my site - right now I am using this tag to make my contianer div extend til the navigation and content is finished: Code: <br style="clear: both;" /> However, this code doesn't work in IE8 and the container DIV becomes way too short. I've researched online and I've found this is a known issue with IE8, but I haven't found a way to circumvent it - is there another way? Thanks Seems I read somewhere that the <clear> tag is now deprecated. I find great use for it and wonder if it really is deprecated. Here is how I use it to line up text with images: <img src="museum.jpg" class="floatLeft imgborder" style="width: 350px; height: 350px;" alt="museum" title="artifacts"> <p>27. Make a "Museum Shelf." This is one of ours. On it we set all sorts of neat things that we find in the wilds. Another has all sorts of different shapes of diamonds found in our Diamond Willow.</p> <BR CLEAR="all"> Is that still OK? hi there, i am working on a page: http://test.furryfrog.co.uk/rokka/private i cant get the content to clear on the right hand side and extend the content area to 100%? i have tried all manner of clears, end divs, 100%heights but i just cant get it. any help is most appreciated. Regards Neil Greetings. I have written a random lottery number generating program in dhtml. The program can generate hundreds of 6 number set lottery numbers in one go. These number sets are written on a frame. To clear this frame, I have to refresh the whole web page. After that, new number sets overwrite the previous ones. Please is there an easier and a better way to clear this frame? please click http://2move.me.uk/londoner.html to check to see what I mean. Regards [SOLVED!] I have a basic input box with a default value of "Enter Your Email Address". I am looking to have that clear as soon as the user clicks in the text area to type their address. Any suggestions on how to do this? Hi, adding rows with the clear:both; attribute causes a huge slow-down and I need an alternative or a solution. I'm composing a friend's resume in html. I'm using nested divs to create a two column format. Each row is a div block that contains two smaller divs--one for each column. Each row uses the attribute clear:both; so that the next row will form cleanly beneath it. I am getting the desired format, but as I add more and more rows, the web browser becomes dramatically slower. 20 rows will make the page un-loadable and the browser crashes. Am I doing something wrong or is there another way to do this? I have posted clear images in 1634x200 header slices on photobucket. However, being new to html coding and writing code, when I code using the following, the images come out all blurry. Is there something in the code that may be altering the image resolution from its native crisp, sharp source files? I have tried jpg, png and used both a large file and exact matching file in terms of dimensions and I continue to get the same blurry results. Thanks. Here is the code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> </head> <body> <table width="100%" border="0" align="center"> <tr> <td align="center"><a href="http://stores.ebay.com/Summit-DVD-Movies-and-Blu-Ray-Disc?_rdc=1"><img src="http://i909.photobucket.com/albums/ac297/summitdvd/Ebay%20Store%20Images%202/header_logomain-4.png" alt="header_logo_top" width="1634" height="169" border="0" /></a> <img src="http://i909.photobucket.com/albums/ac297/summitdvd/Ebay%20Store%20Images%202/header_LLowCorner-1.png" width="58" height="31" alt="header_corn" /><a href="http://stores.ebay.com/Summit-DVD-Movies-and-Blu-Ray-Disc?_rdc=1"><img src="http://i909.photobucket.com/albums/ac297/summitdvd/Ebay%20Store%20Images%202/but_home-1.png" width="84" height="31 " border="0" /></a><a href="http://members.ebay.com/ws/eBayISAPI.dll?ViewUserPage&userid=summit_dvd"><img src="http://i909.photobucket.com/albums/ac297/summitdvd/Ebay%20Store%20Images%202/but_about-1.png" width="84" height="31" border="0" /></a><a href="http://stores.ebay.com/summitdvdmoviesandbluraydisc/pages/policies__W0QQ_modeZpreview"><img src="http://i909.photobucket.com/albums/ac297/summitdvd/Ebay%20Store%20Images%202/but_policies-1.png" width="84" height="31" border="0" /></a><img src="http://i909.photobucket.com/albums/ac297/summitdvd/Ebay%20Store%20Images%202/EbayHdr1634x200r3_07.png" alt="header_bot_bg" width="1324" height="31" /></td> </tr> </table> </body> </html> hey all, here's my site http://www.nativboardriding.com/shopb.htm this paypal form was originally given to me in table format and i dismantled it into divs.. cuz divs are way better obviously.. well.. i'm setting it up like this: <form> Line 1 (all elements float left): first paypal option >> descriptions <br clear="all"> Line 2 (all elements float left): second paypal option >> descriptions <br clear="all"> Line 3 (all elements float left): third paypal option >> descriptions <br clear="all"> Buy now button </form> seems simple enough.. but as u can see the divs arent stacking like i want.. i've dealt with divs a lot and troubleshot it everytime.. i feel like the fact that its embeded in a form that the <br clear="all">'s arent working... seems ridiculous but i cant find any errors. any ideas?? thx Hi all, Just wondering if it's possible to have a "clear cache" function on a website? Is it possible to clear just that particular website or does the entire history get wiped? I ask because I want my visitors to be able to reset what links they have visited on the site. So if there is any other suggestions to achieve this, they would be appreciated as well. Thanks. 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? 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 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; } Help with forms i am trying to get a form on my practice website to work and trying to work out how to get the info from the form sent to my email address when poeple click on the submit button the site it currently is on http://members.iinet.net.au/~garyrei...eb%20services/ I am new to websites and learning heaps as go along not bad for 60yr old hey if you click on the contact us section thats the one i am trying to work out for it to send the info fromthe website to an email address im doing something wrong but not sure what or where if any one can help solve this problem or suggest what i can do to get it working properly that would be very helpful thanks for your help gaza How do I make a script so the submit forms that were submitted go to my email? If you need my whole html/php script to edit it, ill give you. I do not even know where to start for editing. Please tell me where I put my email to make it submit. If its a javascript please help me out. I have a website and I know basic html. But I need to know to to make it so that when people fill out a form on my website and hit submit the information will pop up in an orderly fashion on another page. So the world can see what they have submited. If your wondering it has nothing to do with personal info its totaly different. If you dont understand what im getting at then maybe ill say this. I want people to fill out a submit form and then hit submit then once they have done that i want that information they have submited to go on another seperate page on the site and be there permanently. 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 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 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 |