cwtnancy
03-13-2003, 06:38 PM
I am looking for the text/javascript that tells the person submitting the form that their form was submitted and to reset the form when submitted.:confused:
|
Click to See Complete Forum and Search --> : Text/Javascript "Your Form Has Been Submitted" cwtnancy 03-13-2003, 06:38 PM I am looking for the text/javascript that tells the person submitting the form that their form was submitted and to reset the form when submitted.:confused: Jona 03-13-2003, 06:45 PM Can you run that by me again? You want to reset a form after it was submitted? And you want to display a message after the form was sumitted saying that the form has been submitted? cwtnancy 03-13-2003, 06:50 PM I'm fairly new at web design. The HTML I have down but the Javascript I do not! When the user clicks the submit button I want a window to come up saying that their form was submitted. So far the scripts I'm finding are not user friendly with an email post method. Jona 03-13-2003, 06:53 PM Ok... <script> function newWin(){ Win = window.open('','Win'); Win.document.write("<h1>Your form has been submitted</h1>"); } </script> and in your form: <input type=submit onclick="newWin()"> cwtnancy 03-13-2003, 07:03 PM Well that at least works but the window comes up that validates whether they want to send the email because their email will be known. I believe it's from the server? Jona 03-13-2003, 07:04 PM You mean have like the opened window have a checkbox and if it's checked the email field is emptied; but if it is not checked the email field is not emptied? cwtnancy 03-13-2003, 07:55 PM No..let me try this. You click the submit button. It brings up the about:blank page and it gives me a Microsoft Internet Explorer security bos that says: Your are about to email to a source that will have access to your email address blah blah. It's probably in the Internet Security Options. What I really want is a Javascript that pops up like a function validation warning. Jona 03-13-2003, 08:23 PM I am still not getting this. Can you walk me through what you want? You click submit, it opens a new window, and...? I'm really sorry about this. I just don't understand your question...:( cwtnancy 03-14-2003, 08:26 AM I found something that is confirmsubmit() but I'm not sure that it's user friendly with an email post. Or, onsubmit="return validation()". I am looking for something like this. I believe the window that pops up is an Internet Explorer security issue in the browser that warns someone that they are emailing a form. Had to put my 3 year old to bed so it's the next day:D AdamBrill 03-14-2003, 08:40 AM hmm... Something like this?? if(confirm("Are you sure?")){ alert("You are very sure of yourself!!"); }I'm not exactly sure what you mean either, but I think that might be it. Let me know if it still isn't... ;) cwtnancy 03-14-2003, 10:39 AM If you go to www.communityworldtravel.com on the Travel Request page. When submitting a form I was able to alert the message but the form is now not resetting. This is an awesome forum! I just signed up last night and have gotten more done then doing it on my own!:D pyro 03-14-2003, 10:47 AM So, after the form sends, you want all the field values to reset themselves to blank? Also, remove the onclick in your submit button. The onsubmit tag in the form is all you need. cwtnancy 03-14-2003, 11:10 AM Exactly! I had a feeling that the onsubmit was redundant in the submit field. How do I get it to reset? AdamBrill 03-14-2003, 11:16 AM To reset the form(clear all the fields), you can use this: document.formname.reset(); I think that is what you want... ;) cwtnancy 03-14-2003, 11:24 AM I will be putting this where? <script> <!-- function validate(){ alert("Your Form Will Be Submitted. All Information Will Remain The Same After You Submit In Case You Need Additional Travel Information. Change The Appropriate Boxes And Resend"); } // --> </script> AdamBrill 03-14-2003, 11:29 AM Originally posted by cwtnancy alert("Your Form Will Be Submitted. All Information Will Remain The Same After You Submit In Case You Need Additional Travel Information. Change The Appropriate Boxes And Resend"); umm... If you reset the form the information will not stay the same. ;) It will all be reset. But, to reset the form, you would do it like this: <script language="javascript" type="text/javascript"> <!-- function validate(){ alert("Your Form Will Be Submitted. All Information Will Remain The Same After You Submit In Case You Need Additional Travel Information. Change The Appropriate Boxes And Resend"); document.formname.reset(); } // --> </script>Now I don't know if that is what you want or not, but... ;) cwtnancy 03-14-2003, 11:37 AM Your awesome! Thanks so much! I am new to Javascript but will get it down eventually!:D pyro 03-14-2003, 11:45 AM Now, just remember to chage the alert, as the information will not be remaining the same... ;) webdeveloper.com
Copyright Internet.com Inc., All Rights Reserved. |