2
In my code I check the selected radio and would like to get the radio’s text field as well. How should I do?!
No while it mounts the radios according to the values found in the table and shows the name of the fields found.
<?
while($w_registro = pg_fetch_object($w_queryresultado))
{
print('<input type="radio" name="rb_peri" id="id_rb_peri" value="'.$seq_cara.'">');
print($tx_desc);
}
?>
Ai when the radio is selected and issued a "GO", it calls the function to check the selected radio.
function radio(){
w_qtde_rb = document.forms['sai_frm_alte_novo_cara'].rb_peri.length;
for (w_i=0; w_i < w_qtde_rb; w_i++)
{
if(document.forms['sai_frm_alte_novo_cara'].rb_peri[w_i].checked == true)
{
get_valor= document.forms['sai_frm_alte_novo_cara'].rb_peri[w_i].value;
}
}
}
Then I would like to take the name of the field referring to the selected radio. Any idea?
Thanks a lot @Ruipimentel helped me a lot!!!
– Felipe