Using onsubmit() in javascript
Posted: Wed May 18, 2005 1:11 pm
Hello,
I wasnt sure what to search for concerning my query so i am posting a topic.
I am developing my own custom form validator which is triggered by the submit buttons onClick. my form actions attribute is set to null to avoid submission.
the process here is that on the submit buttons onclick triggers the form validator to calidate the form. on validation it submits but on error i trigger an alert and exit the function.
when i test this out...when exiting the "alert prompt" the form continues on with the submission.
I have researched one of dreamweavers javascript extension and note that a "return document.MM_returnValue" being used.
Can someone offer me some explanation in triggering the form.onsubmit(); from within javascript code rather than on the submit button and why is my form still being submitted?
Kendall
I wasnt sure what to search for concerning my query so i am posting a topic.
I am developing my own custom form validator which is triggered by the submit buttons onClick. my form actions attribute is set to null to avoid submission.
the process here is that on the submit buttons onclick triggers the form validator to calidate the form. on validation it submits but on error i trigger an alert and exit the function.
when i test this out...when exiting the "alert prompt" the form continues on with the submission.
I have researched one of dreamweavers javascript extension and note that a "return document.MM_returnValue" being used.
Can someone offer me some explanation in triggering the form.onsubmit(); from within javascript code rather than on the submit button and why is my form still being submitted?
Kendall