When a User Submits the form i want to stop the default behavior of the form. ie it should not reload. so that i can perform the AJAX request.
here is the code i use
add a return in your event handler:
onsubmit="return validateForm();"
Otherwise the function executed, but doesn't tell the browser to halt processing.