192
rated 0 times
[
194]
[
2]
/ answers: 1 / hits: 21511
/ 14 Years ago, tue, march 1, 2011, 12:00:00
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 used.
<script type=text/javascript>
function validateForm()
{
return false;
}
</script>
<form action= name=contact onsubmit=validateForm();>
<input type=text name=name value=Enter Your Name.../>
<input type=submit name=submit/>
</form>
this does not stop the form from being submitted or reloaded. how do i achieve this?
More From » javascript