Results 1 to 1 of 1
Sep 28, 2007, 09:36 #1
- Join Date
- Apr 2007
- 0 Post(s)
- 0 Thread(s)
checking what the evenlistener function returns
when I submit the form, I need to have it validated before I continue. If it validates correctly i want to call a function. if it doesn't validate then the form doesn't submit and the user should be prompted to the field w/ the problem. the problem is my forms I'm validating are being dynamically created on an iframe. When the user successfully completes the form, the submit is intercepted and I process the form w/ some AJAX and then clear the iframe from the page. the function I call after the form is successfully validated is not always the same too, so I can't just stick it at the bottom the the eventlistener function.
How can I determine if the eventListener function returns successfully or not, so I know if I can call my processing function or keep the user on the form?