I would like to create two buttons, one for activating a checked system user and the other to deactivate a checked system user, but if I use a different function name it doesnt work if I use these two functions it works. Why? is it a must to use them?
function setUpdateAction() {
document.activate.action = "includes/vendors/activate.php";
document.activate.submit();
}
function setDeleteAction() {
document.activate.action = "includes/vendors/deactivate.php";
document.activate.submit();
}
<form name="activate" method="post" action="">
<td><input type="button" name="update" value="Activate" onClick="setUpdateAction();"></td>
<td><input type="button" name="deactivate" value="Deactivate" onClick="setDeleteAction();" />
</form>