i have a simple form validation onsubmit event. The requirement is very simple, if validate.php brings any error it shows errors and it stops form for further processing else form submit and action runs process.php.
But, unfortunately ajax function is not working onsubmit event..
any help please..... files are attached except html code which is here
<html>
<head>
<title>test form</title>
<script type="text/javascript" src="ajax.js"></script>
</head>
<body>
<div id="result"></div>
<form id="form" action="process.php" method="POST" onsubmit="return validate();">
<div>Your name:</div>
<div><input type="text" name="sender_name" size="20" /></div>
<div><input type="submit" name="submit" value="submit" /></div>
</form>
</body>
</html>