HTML - Form Reset From Another Page.
Hello,
I have a simple quiz with 3 parts: the quiz, the results page, and a printable certificate. On the first page (the quiz itself), I have a form with 20 questions and at the bottom is two buttons: Submit and Reset. Both of these work great, that's not the problem. The problem is on the second page. IF the user did not score high enough, they cannot proceed to the printable certificate and must retake the quiz. For this I have a button which takes them back to the quiz. Unfortunately, I can't get it to reset the form. Here's my code for the button: Code: <input type="button" value="Try Again" name="tryagain" onClick="history.go(-1); document.TrainingVideosTest.reset()"> The form on the first page is named TrainingVideosTest. Here's the code for the reset button on the quiz page: Code: <input type="button" value="Reset" name="resetform" onClick="document.TrainingVideosTest.reset()"> Does anybody know how to reset form data from another page? Similar Tutorialshow would i make a form that would send me an e-mail? What i need for it is a place to umput text and a submit button. Also, how would i put a reset button for that? Hello, I have done a search form in HTML (with something in Javascript), and a reset button that works perfectly. The search results are published on the same page of search form, but once its searched the reset button no longer works. So, once the form is submited, reset button stops working ... someone knows how can I fix it? Thank you very much and best regards to all! Is there a way to insure that all form fields are reset to empty or default values upon entry to the page that contains the form? I'm asking this because if someone has already submitted a form and arrives at the next screen, that form has already been logged. If they go back, it gets logged again and I don't want that. I would prefer that the solution would involve HTML &/or PHP because many people have Java script disabled. But, if it can't be done with HTML or PHP, then so be it. I'll have to use Javascript. My first thought was to somehow disable the "Back" button but that is probably offensive to many, and I wouldn't want to alienate anyone. Maybe someone on this forum might have the answer to my question or may be able to suggest another approch I could use. Thanking you in advance, Roy Can someone take a look over here. (LINK) I'm having problem "reset-ing" the graph. Eg. Let say you change all the inputs + color and click on generate graph. After that, click on reset graph. Only the graph changes to (50-50-50) but the axis/inputs/colors remain intact. Any idea? Axis (axisid) Inputs (inputid) Color (colorid) Cheers. I am using four frames. I want it so that when I click the 'home' link, the mainFrame and the contentFrame will return to their original state. How do I do this? Changing one frame is ok, but I dont know how to change them both. This is my main code: Quote: ... <frameset rows="9%,*" cols="*" framespacing="0" border="0"> <frame src="title.htm" scrolling="no"/> <frameset rows="*" cols="13%,19%,68%" bordercolor="#FFFFFF"> <frame src="menu.htm" scrolling="no"/> <frame src="main.htm" name="mainFrame" /> <frame src="content.htm" name="contentFrame" scrolling="no"/> </frameset> <noframes> <body> Get a better web browser! </body> </noframes> </frameset> </html> And here is the menu frame where the Home link is, you can see where I have added the mainFrame. But I want to add the contentFrame too: Quote: <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><style type="text/css"> <!-- body,td,th { font-family: Arial, Helvetica, sans-serif; color: #FFFFFF; } body { background-color: #000000; } a:link { color: #FFFFFF; text-decoration: none; } a:visited { text-decoration: none; color: #FFFFFF; } a:hover { text-decoration: none; } a:active { text-decoration: none; background-color: #000000; } .style1 {color: #FFFFFF} --> </style> <table width="100%" border="1" bordercolor="#FFFFFF" align="center" > <tr> <td><div align="center"><a href="main.htm" target="mainFrame">Home</a></div></td> </tr> </table> <table width="100%" border="1" bordercolor="#FFFFFF" align="center" > <tr> <td><div align="center"><a href="images/images.htm" target="mainFrame">Images</a></div></td> </tr> </table> <table width="100%" border="1" bordercolor="#FFFFFF" align="center" > <tr> <td><div align="center"><a href="videos/videos.htm" target="mainFrame">Video</a></div></td> </tr> </table> <table width="100%" border="1" bordercolor="#FFFFFF" align="center" > <tr> <td><div align="center"><a href="audio/audio.htm" target="mainFrame">Audio</a></div></td> </tr> </table> On an order entry web page I would like to code a reset button that clears out data a user has entered. I inherited a HTML/PHP project which was a written in hurry and now I am trying to put in some editing and other confirmations. A type=reset was added to the screen and there is 2 option lists. When the form is first load only 1 list is displayed. Then the user makes the selection and depending on the selection the second list would display or not. On the reset option would like to hidden the 2nd selection but seems I can not get the right coding. I have tried onclick on the <input but no luck. There is a onSubmit on the <form which calls some validation checking. Tried put the call to function to hide the option list but no luck. Of course, I probably did not have the coding correct. How can I hide the 2nd option list on reset. i have written a simple html form code the problem is that this code is working fine when run in interner explorer, if i run in mozilla firefox form reset button work as submit button it show submit validation code when reset button press, can any one help me here is the code <script type="text/javascript"> function validation() { alert("submit buton has pressed"); return true; } </script> <body> <form id="form1" name="form_feedback" method="post" onsubmit="return validation();"> <table width="488" border="0"> <!--DWLayoutTable--> <tr> <td width="85"><span>Name:</span></td> <td width="393"><input name="txt_name" type="text" id="textfield2" size="35" /></td> </tr> <tr> <td><span>Email:</span></td> <td><input name="txt_email" type="text" id="textfield3" size="35" /></td> </tr> <tr> <td><span>Address:</span></td> <td height="0"><label> <textarea name="txt_address" id="textarea" cols="45" rows="2"></textarea> </label></td> </tr> <tr> <td><span>Phone No:</span></td> <td height="0"><input name="txt_phoneno" type="text" id="textfield4" size="20" onkeypress="return numeralsOnly(event)" /></td> </tr> <tr> <td><span>Comments For:</span></td> <td height="0"><input name="txt_commentsfor" type="text" id="textfield5" size="20" /></td> </tr> <tr> <td><span>Comments:</span></td> <td height="0"><label> <textarea name="txt_comments" id="textarea2" cols="45" rows="5"></textarea> </label></td> </tr> <tr> <td height="0"><label> <input type="submit" name="btn_submit" value="Submit"/> <input type="reset" value="Reset" name="btn_reset"/> </label></td> </tr> </table> </form> </body> Hey guys Im having trouble with some html code, if you could help out that would be great. What im trying to do is put an activeX control into a .htm page and use a html form. The .htm uses the activeX to read a .txt file, and displays the data in a table, with headings, descriptions, images, and a text box used for selecting a quantity. Then at the bottom of the page, I have made a simple send to email button, and a reset button. However my problem is; I dont think the code for the form is enclosing the whole table. Here's the code I hope this works... <body> <object id="Productlist"classid="CLSID:333C7BC4-460F-11D0-BC04-0080C7055A83"> <param name="DataURL"value ="data/Partsproductlist.txt"/> <param name="UseHeader" value="TRUE"/> <param name="FieldDelim" value=","/> </object> <table DATASRC="#Productlist" style="border-style: ridge; border-color:darkseagreen; background-color:lightcyan"> <thead><tr style="background-color:aqua"> <th></th> <th>Product Name</th> <th>Product Description</th> <th>Unit Price</th> <th>Quantity</th> </TR></thead> <tbody> <tr style="background-color: ***hsia"> <td><span><img DATASRC ="#Productlist" DATAFLD="ProdImage" width="150" height="150" /></span></td> <td><span DATAFLD ="ProductName"></span></td> <td><span DATAFLD="ProductDescription"></span></td> <td><span DATAFLD="UnitPrice"></span></td> <td> <form><input type="text" name="quantity" id="numberinput" value="0" tabindex="0"/></form></td> </tr> </tbody> </table> <form Name="FormProductBoundOrder" method="post" action="mailto:abc@abc.co.uk" subject="emailsubjectwouldgohere"> <input type="submit" value="send"/> <input type="reset"/> I'm a relative novice to HTML and CSS trying to earn some extra cash doing freelance web designing. With the project I'm working on now, my client has pointed out that in IE 6 and 7, the Submit and Reset buttons of the Contact page are not working. The thing is, they actually are working, it's just that the rollover area for some reason has been reduced to just the bottom edge of the button. Here's the url I test off so you can see what I mean: http://www.animationpolitik.com/newDMsite/contact.html The buttons work just fine in Firefox and IE8. However if you go into either IE6 or 7 you'll notice that the interior yellow highlight of the Submit and Reset buttons only lights if you carefully roll over the bottom edges of the buttons. They'll work if you hit them at those exact locations, but if you mouse over the center of the buttons and click, nothing happens, which apparently is confusing a lot of my client's customers. It's strange because these are just the default buttons that are created when using the <form> tag; there's no styling on them whatsoever. The table I have them nested in reads like this: <form method="post" action="contact_retrieval.php" target="_top"> ... <table class="comments" border="0"> <tr> <td height="18" colspan="2">Additional comments/questions:<br /> <textarea rows="7" cols="55" wrap="physical" name="comments"> </textarea> </td> </tr> <tr> <td width="87" height="18"><input type="submit" value="Submit" name="submit"></td> <td width="393"><input type="reset" value="Reset" name="reset"></td> </tr> </table> </form> I've been searching the issue for the past several hours and have tried everything from moving the buttons outside the table to relocating them outside the <form></form> tags, but nothing woks. Any idea what could be causing this madness? Any help with this situation would be greatly appreciated! i used javascript rich text editor in my code but when i reset form all the fields get reset except text area [javascript rich text editor]. even when i get value from javascript code it doesnt return value............ here is the code //text area <textarea cols="80" rows="10" name="news_description" class="widgEditor nothing">textarea> //reset code function resetTextArea() { document.form_addnews.txt_desc.value = ""; } //get value of text area...it does not work, odnt retyrn any value var cdescription = document.editnews.news_description.value.length; if(cdescription < 0) { alert(document.editnews.news_description.value); alert("Please enter Description"); document.editnews.news_description.focus(); return false; } A page experiencing the problem I'm describing is: http://www.gigichic.com/press.aspx The issue is there's a form on the page at the bottom to submit your first name and e-mail to subscribe to a newsletter. The pages are all ASP generated, so it's a form within a form. To work around the issue, I added a </form> tag at the beginning of the new form to stop the ASP's form from continuing. This works great in Firefox, Opera, and Safari, but Internet Explorer destroys the layout. To attack the problem from a different approach, I've created a page called "newsletter.html" which contains the form and the social buttons (see he http://www.gigichic.com/newsletter.html ). The thought was - create the page, call it from an iFrame in the top bar (client wanted it up top originally). The problem there is that I can't figure out how to get the "Join" button to redirect the parent page instead of just the 36px*400px iFrame. The code for the form used is: Code: <form method="post" action="https://app.icontact.com/icp/signup.php" name="icpsignup" id="icpsignup3859" accept-charset="UTF-8" onsubmit="return verifyRequired3859();" > <input type="hidden" name="redirect" value="http://www.gigichic.com/thankyou.aspx"> <input type="hidden" name="errorredirect" value="http://www.icontact.com/www/signup/error.html"> <div id="SignUp"> <table width="100%" class="signupframe" border="0" cellspacing="6" cellpadding="0"> <tr> <td align="center"> Want to know about our latest fashions, sales and events? Subscribe to our newsletter today! <input type="text" name="fields_email" size="12" placeholder="Email Address"> <input type="text" name="fields_fname" size="12" placeholder="First Name"> <input type="hidden" name="listid" value="46074"> <input type="hidden" name="specialid:46074" value="CUNO"> <input type="hidden" name="clientid" value="250803"> <input type="hidden" name="formid" value="3859"> <input type="hidden" name="reallistid" value="1"> <input type="hidden" name="doubleopt" value="0"> <input type="image" name="Submit" value="Submit" src="/images/join.png"> </td> </tr> </table> </div> <script type="text/javascript"> var icpForm3859 = document.getElementById('icpsignup3859'); if (document.location.protocol === "https:") icpForm3859.action = "https://app.icontact.com/icp/signup.php"; function verifyRequired3859() { if (icpForm3859["fields_email"].value == "") { icpForm3859["fields_email"].focus(); alert("The Email field is required."); return false; } if (icpForm3859["fields_fname"].value == "") { icpForm3859["fields_fname"].focus(); alert("The First Name field is required."); return false; } return true; } </script> I've tried using javascript to pass the "action" values to the parent page: iFrame: Code: <script type="text/javascript"> function change_parent_url(url){ document.location=url; } </script> Parent: Code: <form method="post" action="https://app.icontact.com/icp/signup.php" name="icpsignup" id="icpsignup3859" accept-charset="UTF-8" onsubmit="return verifyRequired3859();" > <input type="hidden" name="redirect" value="javascript:parent.change_parent_url('http://www.gigichic.com/thankyou.aspx');"> <input type="hidden" name="errorredirect" value="javascript:parent.change_parent_url('http://www.icontact.com/www/signup/error.html');"> But this generates a different error. So I trying to tackle this form issue, from either a "form within a form" approach, or a "form within an iframe" approach. I'm not very good at Javascript and I don't understand the rules of ASP page generation to know how to work around it... All help is greatly appreciated. Please and thank you. Go to the web page: http://YourCarThings.com and then select "About Us" from the Top Menu. When you go to the "AboutUs" page, you will receive the error: "Done, but with errors" I caused this by replacing the: jumpmenu Java Script Go to any of the other pages, and you won't get the error message because they use the previous jumpmenu javascript. Please advise. Thanks. Doug Walker I have 4 <form> enclosures on one HTML page, however only the first one works. Is there a technique for using multiple ones? Quote: <form action="default.aspx" method="POST" runat="server" id="form2"> <input type="hidden" name="datfield1" value="addcanvasdeal"> <input type="hidden" name="datfield2" value="2"> <input type="hidden" name="datfieldprice" value="12.99"> <input type="hidden" name="datfieldqty" value="2"> <input type="hidden" name="datfieldcarttype" value="1"> <input type="hidden" name="datfieldtitle" value="Item 1"> <input type="submit" value="Add to Cart" name="B1" style="float: right"> </form> Each field for each form is different. Hey, I was wondering if there's any way (without Javascript, I wouldn't mind PHP though) to draw a value (say a persons name) from one HTML page, to a new window with, say, a comment box, and the person they are commenting about is already typed out for them, or stored hidden somewhere. Each different page would link to the same comment box, but the name value would be different depending on WHO they want to comment on. I've got a form on our contact us page where people can send us emails directly through our website. I want to set it up so when a person hits send, they are redirected to a landing page where it says something like, We have received your message, blah blah blah..... How do I do this? how 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> Hey everyone, This is my first post here, and I was hoping you guys could help me with a problem I am having. I own a race photography company and I am trying to find a way to create a form that athletes can fill out and it will take them to their images. I have keyworded all the images on my smugmug site with a race id followed by a number, such as "gunstock 6" So if they visit http://blahblahblah.smugmug.com/keyword/gunstock 6 it will bring up all the images of them from that race (every image keyworded with gunstock 6) However..... what I want to do is make that into a form which will take them to that specific page. I am a newbie when it comes to designing forms and webpages, and after searching around, it seemed the form get command sort of achieves what I want, in that it takes the form input and places it in the url. However... it also places the usual query text such as the question mark, =, and all that good stuff. So when I enter the race id and number on my form, it will instead take me to the url .../keyword/?=gunstock&=6, which instead of being a defined page with all of the images keyworded gunstock 6, it will just bring me to the keyword search page of smugmug. Is there any way to design a form that redirects simply to the .../keyword/raceid # url format? Thanks a million! bro can u please help me in making my web page efficient.........i want 2 form method refer to the same html page with different functionality. |