In my code I check the selected radio and would like to get the radio text field as well. How should I do it?!
No while it mounts the radius 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);
}
?>
Then when the radio is selected and a "GO" is issued, 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;
}
}
}
Here I would like to get the field name for the selected radio. Any idea?