After struggling with some syntax problems in my first javascript, I have something that is 50% there. The following is working:
Later in a form I have sets of 3 radio buttons (one set is presented for simplicity):
A negative confirmation turns 'off' the "Reject" button as it should. However, I cannot have all of the buttons 'off' which is the case after a negative confirmation. I cannot figure out how to refer to the "Defer" button, within the function, to turn it 'on' once the "Reject" has been turned 'off'.
Thanks for any help.
Code:
<head>
.
.
.
<script language="javascript" type="text/javascript">
<!--
function verify_reject(button_name,file_name)
{
if (!confirm("Rejecting " + file_name + " will remove it from the server."))
{
button_name.checked=false;
}
}
//-->
</script>
</head>
Code:
<input type="radio" name="Disposition1" value="Approve">
<input type="radio" name="Disposition1" value="Reject" onClick="verify_reject(this,'Intro ad.wav')">
<input type="radio" name="Disposition1" value="Defer" CHECKED>
Thanks for any help.