I'm not sure the best way to get around my problem, this is what I'm trying to do. and just some FYI I'm trying to use the reusable form validation script from the simply javascript book.

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.

my question:
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?