Disable HTML Button
Hello,
I believe I saw a thread about this, but the answer wasn't very descriptive in what to do.
Basically I have an Apex application that simulates a workflow.
We have a series of buttons to initiate the auditing of a record.
For example, we have buttons like
Begin Data Entry, Complete Data Entry, Begin QC, Complete QC, etc.
We want the users to click on each button once they have started and completed their tasks.
After clicking, I want each of the buttons to be disabled, so that they cannot click on it again. I just want it to be grayed out.
I am not sure what the javascript syntax ...
This is what I have seen on the forums ... http://atulley.wordpress.com/2007/09/16/apex-ensuring-a-button-is-clicked-only-once/
also ...
<script language = "javascript">
if($x('P1_FLAG').value=="1")
{
$x('submitBtn').disabled = true;
}
else
{
$x('submitBtn').disabled = false;
}
</script>
also ...
<script type="text/javascript">
$x_disableItem('P999_BUTTON1',true);
$x_disableItem('P999_BUTTON2,true);
etc.
</script>
None of these worked for me ...
or ... I don't know where to put them, in the JavaScript page header, in a hidden item?
I did try doing several methods, but the JavaScript didn't disable the buttons. Maybe it's not being referred correctly? How do I refer to the specific buttons? Is it the Button Name?
Any suggestions are truly appreciated!
Thanks!
Ann