Monday, June 3, 2024
 Popular · Latest · Hot · Upcoming
19
rated 0 times [  20] [ 1]  / answers: 1 / hits: 75204  / 14 Years ago, tue, april 6, 2010, 12:00:00

I have two forms, one with a radio button that users must select to edit.



[form name=A]
<li>[input type=radio name=BookItem value=1 /]</li>
<li>[input type=radio name=BookItem value=2 /]</li>
<li>[input type=radio name=BookItem value=3 /]</li>
[form]<p>


After BookItem is selected from form (A) I call the $(#EditFormWrapper).load(callEditData.cfm? ID=+ID); function to load the second form (B)



<div id=EditFormWrapper><div></p>
<!---// begin dynamic form generated by external file callEditData.cfm //--->
[form id=editForm name=B]
<ul class=hourswrapper>
<li><input type=checkbox id=TOR2Hours class=TOR2Hours name=TOR2Hours value=AM2Hrs1 /> 2 Hours AM</li>
<li><input type=checkbox id=TOR2Hours class=TOR2Hours name=TOR2Hours value=PM2Hrs1 /> 2 Hours PM</li>
<li><input type=checkbox id=TOR2Hours class=TOR2Hours name=TOR2Hours value=AM2Hrs2 /> 2 Hours AM</li>
<li><input type=checkbox id=TOR2Hours class=TOR2Hours name=TOR2Hours value=PM2Hrs2 /> 2 Hours PM</li>
</ul>
[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]
<!---// end dynamic form from external file //--->


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!


More From » jquery

 Answers
161

I'm not sure exactly what you want but you might try using a reset input.



<input type='reset' />

[#97144] Friday, April 2, 2010, 14 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
nikoguym

Total Points: 339
Total Questions: 106
Total Answers: 95

Location: Mali
Member since Sat, Feb 12, 2022
2 Years ago
;