Click to See Complete Forum and Search --> : Form re-direct headaches...


jaselamont
02-02-2006, 02:45 PM
Hey all - I've built a form for my department for ordering cell phones. I have included validation and it works killer, but I need the form to re-direct to a page letting the user that the form was submitted successfully. I had a small script that would do this as part of the button submit, but now with validation in place that script no longer is feasable as it was not written to work with validation. I've hacked in some random stuff I've found on the WWW but none of it works in my form. I've attached what I have so far - maybe one of you gurus could take a look and point me in the right direction. Thanks for reading all of this crap!

-jase

jaselamont
02-03-2006, 09:27 AM
Heeeelloooo? No-one here can help?

konithomimo
02-03-2006, 10:04 AM
There are two choices:

1.Change your onsubmit to:

onsubmit="return validationfunction; redirectfunction;"

where validationfunction and redirectfunction are replaced with the proper names of your functions.


2. Change your submit button to a regular button. Then set its onclick to your validation function. Then in your validation function if there are no errors do:

document.myform.submit();

where myform is replaced with the name of your form.