cancel
Showing results for 
Search instead for 
Did you mean: 

javascript check on HTMLB radiobutton in radiobutton group

Former Member
0 Kudos

Hi

I want to check which radio button in my htmlb radio buttongroup is selected.

I have tried to

alert(eval(func("myButtonGroup"+htmlb_radiobuttonmodifier.substring(3,7)+"1")));

but alert only shows 'undefined'.

Is there any way to actually check what exactly I must inside "" in eval(func(""))?

thanks in advance

Anton Kruse

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

First call a javascript function on selection of a radio button and inside that function write the following code.

<script language="javascript">

function checkRadio() {

var funcName = htmlb_formid+"_getHtmlbElementId";

func = window[funcName];

//you have to use the name of radio group

var rb1 = eval(func("myButtonGroup" +

htmlb_radiobuttonmodifier.substring(3,7)+ "1"));

alert(rb1.getValue());

alert(rb1.getChecked());

}

</script>

Regards,

Tamil K

Former Member
0 Kudos

thanks.

I also figured out why mine wasn't working.

I forgot to set jsObjectneeded=true.

thanks again