Determining submit button pressed without onClick event handler
Posted on 2004-04-01
In my code I have a form similar to this:
<form action=testpost.jsp method=post onsubmit='postdiv(this);return false'>
<input type=submit name="testsname" value="testsvalue">
<input type=submit name="testsname" value="testsvalue2">
in the postdiv function, i need to know which of the submit buttons was pressed. I cannot use an onclick method because it would involve too much code rework. I can I find out which button triggered the submit. The browser has to be able to know somehow because it only includes that button with the form on the post. Any help would be greatly appreciated.