help with jquery radio and submit button confirm
I need some help getting this jquery script to give me a confirmation message when the user selects the submit button.
I want to check if the radio button Decline is selected when the submit button is selected.
Here is my juqery and the radio button and submit input elements that I'm using. I have to use the ID=REquired so I need to use the elements name.
-
<script type="text/javascript">
-
$(document).ready(function () {
-
$('input:radio[name=Submit2a]').click(function () {
-
if ($('input:radio[name=VisaDisclosure]').is(':checked'))
-
{ confirm("Are you Sure you want to Decline"); }
-
})
-
})
-
</script>
-
<input ID=Required type="radio" name="VisaDisclosure" value="Accept" />Accept <input type="radio" ID=Required name="VisaDisclosure" value="Decline" />Decline
-
<INPUT id="Submit2a" TYPE="Submit" Name="Submit2a" Value="Next">