Andy

works fine for me:

           // possui dependentes
           $(".show_familiares__pes_ds_dependente_possui").hide();

$("[EMAIL PROTECTED]'familiares__pes_ds_dependente_possui']").click(function(){
           if
($("[EMAIL PROTECTED]'familiares__pes_ds_dependente_possui'[EMAIL 
PROTECTED]").val() ==
"1"){
               $(".show_familiares__pes_ds_dependente_possui").show();
           }
           else{
               $(".show_familiares__pes_ds_dependente_possui").hide();
           }
           });





                   <!--- somente exibir se houver dependentes--->
                   <tr>
                       <td>Possui
dependentes(pes_ds_dependente_possui)</td>
                       <td><input id="familiares__pes_ds_dependente_possui"
name="familiares__pes_ds_dependente_possui" type="radio" value="1"
/>&nbsp;Sim<cfoutput>#RepeatString("&nbsp;",15)#</cfoutput> <input
name="familiares__pes_ds_dependente_possui" type="radio" value="2"
/>&nbsp;Não</td>
                   </tr>
                   <tr class="show_familiares__pes_ds_dependente_possui">
                       <td>Quantidade de
dependentes(pes_nu_dependente)</td>
                       <td>
                           <input
                               id="familiares__pes_nu_dependente"
                               name="familiares__pes_nu_dependente"
                               type="text"
                               size="50"
                               onkeypress="return (     String.fromCharCode
(window.event.keyCode).search(/[0-9]/i) > -1 );"
                               maxlength="22" />
                       </td>
                   </tr>


Cheers

2007/3/21, Andy Matthews <[EMAIL PROTECTED]>:

 I have three radio buttons, each with an id ("p", "s", "m") and a group
name of "domainlist". I also have a div with an id ("manual") which
contains a textarea box. I'm styling the div to be hidden by default. What
I'd like is that when someone clicks the "m" radio button, I'd like to
display the manual div but if they click any other radio button, I want to
hide it (if it's not already hidden).

I know how to access any of the form fields using their ID, but I can
never remember how to interact with radio buttons or checkboxes. This is
what I've got so far:

// it's the third radio button that is "m"
$([EMAIL PROTECTED]')get[2].toggle(function(){
 $('#manual').slideDown("fast");
},function(){
 $('#manual').slideUp("fast");
});

Here's the code:
<input type="radio" name="domainlist" value="p" id="p"> <label
for="domainlist_p">Run primaries</label><br />
<input type="radio" name="domainlist" value="s" id="s"> <label
for="domainlist_s">Run secondaries</label><br />
<input type="radio" name="domainlist" value="m" id="m"> <label
for="domainlist_m">Run these</label><br />
<div id="manual">
    <textarea name="manual" rows="6" cols="35"></textarea>
</div>

* ____________________________________

Andy Matthews
*Senior Coldfusion Developer

Office:  877.707.5467 x747
Direct:  615.627.9747
Fax:  615.467.6249
[EMAIL PROTECTED]
www.dealerskins.com


_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/



_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

Reply via email to