How to Uncheck A radio button
- by user281867
Hi,
I have two forms, one with a radio button that users must select to edit.
[form name="A"]
[input type="radio" name="BookItem" value="1" /]
[input type="radio" name="BookItem" value="2" /]
[input type="radio" name="BookItem" value="3" /]
[form]
After "BookItem" is selected from form (A) I call the $("#EditFormWrapper").load("callEditData.cfm? ID="+ID); function to load the second form (B)
[form id="editForm" name="B"]
2 Hours AM
2 Hours PM
2 Hours AM
2 Hours PM
[input type="image" src="images/submit-btn.gif" id="addBTN" name="addBTN" class="buttons" alt="SubmitRrequest" /]
[input type="image" src="images/cancel-btn.gif" id="editBTNcancel" name="editBTNcancel" class="buttons" alt="Cancel Request" /]
[/form]
I want to uncheck the radio button on form (A) when user click on cancel button (editBTNcancel) in form(B).
Here s my script:
$("#editBTNcancel").live("click", function(event){
event.preventDefault();
$("#EditFormWrapper").slideUp("fast").empty();
//$('.TOR2Hours').removeAttr('checked');
$('.TOR2Hours').attr('checked', false);
});
I hope I clearly state my problem, any suggestion would be greatly appreciated!