Disable another button once it has successfully submitted the form
I know there are a lot of questions about it, but I tried several
solutions, and nothing seems to work for me.
I have a form with 2 button: Approve and Reject.
<input type="button" name="Approve" value="Approve"
onClick="location.href='approve.php?user=<?php echo
$row['icnum'];?>&states=1'">
<input type="button" name="Reject" value="Reject"
onClick="location.href='approve.php?user=<?php echo $row
['icnum'];?>&states=2'">
I want to disable the "Reject" button once the "Approve" button is
clicked. So, the user cannot reject the form again after it has been
approved.
I have tried several codes, like:
<input type="button" value="Send" onclick="javascript=this.disabled =
true; form.submit();">
But this code does not work for me. Even if it's actually working, the
button is just disabling itself, not the other button.
I'm using Chrome. Any idea on how to solve this? I'm greatly appreciated
for your help.
No comments:
Post a Comment