Friday, May 10, 2024
 Popular · Latest · Hot · Upcoming
86
rated 0 times [  93] [ 7]  / answers: 1 / hits: 91651  / 15 Years ago, thu, september 17, 2009, 12:00:00

I have a very basic form at http://www.happyholidaylites.com/contact.html and it is working great. When you submit the form, the user is brought to the index.html with no message that the form has been sent. I am looking to initiate an alert that says, your form has been submitted with an x button. My code looks like this:





      <form method=post id=myForm action=dynaform.php>

<input type='hidden' name='rec_mailto' value='[email protected]'>
<input type='hidden' name='rec_subject' value='New Contact Form'>
<input type='hidden' name='rec_thanks' value='index.html'>


so on and so forth.....



The last line is what is telling the form what to do after the submit button is pressed, but I dont want it to point the browser to the index, rather I want a javascript popup with a success message. Any ideas?


More From » forms

 Answers
15

Why not a simple onSubmit?



<form method=post id=myForm action=dynaform.php onSubmit=alert('Thank you for your feedback.'); >

[#98674] Monday, September 14, 2009, 15 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
ryderalfonsos

Total Points: 655
Total Questions: 88
Total Answers: 91

Location: Nauru
Member since Thu, Feb 2, 2023
1 Year ago
ryderalfonsos questions
Mon, Sep 9, 19, 00:00, 5 Years ago
Wed, Feb 13, 19, 00:00, 5 Years ago
Tue, Feb 12, 19, 00:00, 5 Years ago
Fri, Dec 28, 18, 00:00, 5 Years ago
;