I have the following code:

Code:
<form name="rar" method=post action="update.asp" onsubmit="return validate()">

<input name="update" type="submit" value="Cancel">
<input name="update" type="submit" value="Update" >        

</form>
how can I detect if the user has pressed Cancel or Update within the validate function (i.e. onsubmit="return validate()")?

Cheers!