Which Button was clicked?
Hey all, first post and couldn't find any related questions...
I have a form with an onsubmt="return validateForm()"...
I have two buttons: A Modify and a Delete. I have a validateForm function. In my function, how can I tell which button was clicked.
<form name="form1" action="<?= $PHP_SELF ?> method="POST" onsubmit="return validateForm()">
... form stuff ....
<input type="submit" name="modify" value="modify">
<input type="submit" name="delete" value="delete">
What I want to do is, when the delete button is clicked, provide the user with a messagebox stating, "You are about to delete a record, do you want to procede?"
if Yes is clicked, process the form.
Any thoughts.
Thanks,
jdc