Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Radio Button onchange javascript not working

Status
Not open for further replies.

scabral1979

Programmer
Feb 27, 2015
3
GB
Hi,
i have the following javascript on a radio button prompt:

<script type="text/javascript">

var fW = (typeof getFormWarpRequest == "function" ? getFormWarpRequest() : document.forms["formWarpRequest"]);
setTimeout('fW.elements["_oLstChoicesQuickSearch"].onchange = setBufferZone();', 5);

function setBufferZone()
{
var quickSearchList;
var quickSearchListSelected;
quickSearchList = fW._oLstChoicesQuickSearch;
for (i=0; i < quickSearchList.length; i++)
{
if (quickSearchList.checked)
{
quickSearchListSelected = quickSearchList.value;
}
}
alert(quickSearchListSelected);
}

</script>

the alert runs the 1st time the page is loaded, but then it will not run again even on change of the radio button. It seems like the javascript no longer sees the radio button group for some reason.
was wondering if anyone has run into this issue before. Using Cognos version 10.2.1.
thanks
Scott
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top