Hi
I am using cognos 10.1.1 and TM1 as the data source.
I am having a check box prompt "City" and "uncheck" java-script button in report page and I have incorporated this report in portal page.whenever user press the uncheck button, automatically all the values selected should be unchecked.
I have written the below java-script code for this requirement.
This code is working fine in IE browser but not in firefox (its working fine for first time click on Uncheck button, when we click the button again after new selection, no action is happening - selected values are still checked).
I need help writing Java-script to achieve this requirement both in IE & Firefox.
JavaScript Code
<input id="button1" value= "Uncheck" type="button" onclick="ClearSelections()"/>
<script>
function ClearSelections()
{
var fW = (typeof getFormWarpRequest == "function" ? getFormWarpRequest() : document.forms);
if ( !fW || fW == undefined)
{
fW = ( formWarpRequest_THIS_ ? formWarpRequest_THIS_ : formWarpRequest_NS_ );
}
var preFix = "";
if (fW.elements)
{
preFix = fW.elements.value;
}
var list = fW._oLstChoicesCity;
for (var i=0;i<list.length;i++)
{
list.checked=false;
}
setTimeout('oCV' + preFix+ '.promptAction(\'reprompt\')', 0);
}
</script>
Thanks in advance.
Any Solutions????
Please help.