COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: venkiatmaruthi on 17 Mar 2011 03:11:07 AM

Title: Cognos 8.4.1: Capture Radio button group selected value
Post by: venkiatmaruthi on 17 Mar 2011 03:11:07 AM
Hi,

How to capture the radio button group selected value using Javascript.

I have a prompt Location which is a radio button group.

Using Javascript I want to capture the selected value and do some validation.

par_Loc = getFormWarpRequest()._oLstChoicesLocation.value;


How can I do this. The above stmt is not working.

Thanks.
Title: Re: Cognos 8.4.1: Capture Radio button group selected value
Post by: venkiatmaruthi on 18 Mar 2011 06:47:00 AM
Hi

I got it. we have to use for loop and if condition to get the value. Here is the code.


var radbutton1;
radbutton1=getFormWarpRequest()._oLstChoicesLocation;
for (count=0;count <radbutton1.length; count++)
if (radbutton1[count].checked)
par_Loc=radbutton1[count].value;