Is it possible to have a confirmation dialog come up when a user submits form data? And if the user cancels the data will not be sent.
-ptolemy
| SitePoint Sponsor |
Is it possible to have a confirmation dialog come up when a user submits form data? And if the user cancels the data will not be sent.
-ptolemy





Use the onsubmit event on the form to return the response of a confirm.
Flawless
---=| If you're going to buy a pet - get a Shetland Giraffe |=---

Check out the tutorial "Using JavaScript's confirm() Method to Control Form Submission" tutorial at the following site:
http://webreference.com/programming/...irm/index.html
Great tutorial, very easy to follow, doesn't get too technical.
Good luck
Ben
ben_m_gunn, thanks a lot! The tutorial was perfect. I can even use this with standard links which is great!
Thanks again,
-ptolemy
Bookmarks