[jQuery] toggling radio buttons

[jQuery] toggling radio buttons

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.6000.16414" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=063270420-27022007><FONT face=Arial size=2>I have a series of
radio buttons with values of either 1 or 0.</FONT></SPAN></DIV>
<DIV><SPAN class=063270420-27022007><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=063270420-27022007><FONT face=Arial size=2>I'd like to write a
jQ script which sets all o values (unapproved) to 1 (approved). I thought that
one of these two would do it:</FONT></SPAN></DIV>
<DIV><SPAN class=063270420-27022007><FONT face=Arial
size=2>$("input[@type=radio][@checked]").val(1);<BR>$('input[@value=0]').val('1');</FONT></SPAN></DIV>
<DIV><SPAN class=063270420-27022007><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=063270420-27022007><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=063270420-27022007><FONT face=Arial size=2>in the following
context:</FONT></SPAN></DIV>
<DIV><SPAN class=063270420-27022007><FONT face=Arial
size=2>$('.approve').click(function() {<BR>   
$("input[@type=radio][@checked]").val(1);<BR>    //
$('input[@value=0]').val('1');<BR>    return
false;<BR>});</FONT></SPAN></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=063270420-27022007>i know that I'm
getting inside the click function, but for some reason it doesn't seem to be
setting the values correctly. Anyone have an idea?</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV align=left><SPAN style="FONT-SIZE: 14px"><B><FONT face="Century Gothic">
<DIV align=left><SPAN class=159130414-05012007><FONT face=Arial size=2><SPAN
class=159130414-05012007><FONT face=Arial
size=2>____________________________________</FONT></SPAN></FONT></SPAN></DIV>
<DIV><SPAN class=159130414-05012007><FONT face=Arial size=2><SPAN
class=159130414-05012007></SPAN></FONT></SPAN> </DIV>Andy
Matthews<BR></FONT></B></SPAN><SPAN style="FONT-SIZE: 11px"><FONT
face="Century Gothic"><SPAN
style="FONT-SIZE: 8.5pt; FONT-FAMILY: 'Century Gothic'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA; mso-no-proof: yes">Senior
Coldfusion Developer</SPAN><BR></FONT></SPAN><SPAN style="FONT-SIZE: 11px"><FONT
face="Century Gothic"><FONT color=#808080><IMG alt="" hspace=0
src="cid:063270420@27022007-0A80" border=0><BR></FONT>Office:  877.707.5467
x747<BR>Direct:  615.627.9747<BR>Fax:
 615.467.6249</FONT></SPAN></DIV>
<DIV><SPAN style="FONT-SIZE: 11px"><FONT
face="Century Gothic">amatthews@dealerskins.com<BR><A
href="http://www.dealerskins.com/">www.dealerskins.com</A></FONT></SPAN></DIV>
<DIV> </DIV></BODY></HTML>
_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/