Which submit button was pressed

admin

Administrator
Staff member
Is there a way I can find which submit button was pressed in a form like this:


<form action="..."><p>
<input type="submit" name="button1" value=http://www.webdeveloper.com/forum/archive/index.php/"value1" />
<input type="submit" name="button2" value="value2" />
</p></form>


I want to have a confirm box appear when the user presses the first submit button only. I've checked the event variable in the onsubmit event handler with a for-in loop, but can't find what I'm looking for.
 
Back
Top