Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

onsubmit 1

Status
Not open for further replies.

ddrillich

Technical User
Joined
Jun 11, 2003
Messages
546
Location
US
Good Day,

I have this trivial program. For some reason the onsubmit function test isn't being called. Am I missing the obvious? I suspect it is a browser thing since we use here a customized version of IE.

Thanks,
Dan


<form action="processmail.php" method="post" name="newUserForm">

<input type="submit" value="Submit Request" onsubmit="return test();">

</form>



<script LANGUAGE="JavaScript">

function test() {

alert('xxx');
return false;

}

</script>
 
Submit buttons don't have onsubmit event handlers, but forms do. Move the handler to the <form> tag.

Lee
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top