Topic
  • No replies
marathonman
marathonman
1 Post

Pinned topic V10.1 Javascript problem with dynamic checkbox prompt

‏2013-08-28T17:09:49Z |

Our Production system is Cognos Express 9.5.  We have a Report Studio report which uses javascript to select certain values in a checkbox before it is shown to the user.  The user then has the option of changing these selections before he submits the prompt page.  This has been working a long time and works fine in V9.5.  However in Cognos Express V10.1 the behavior changes and is very strange.  Upon executing the report, none of the CheckBox values appear to be selected, yet when the prompt page is submitted, the report runs with values that were obviously selected in the Checkbox.  If then from the Cognos Viewer,  the user re-runs the report, the prompt page this time shows the "checks" for the appropriate selected values in the checkBox.

I have simplied the code for purposes of this post.  Here is the javascript code:

<script>
 
 var fW = (typeof getFormWarpRequest == "function" ? getFormWarpRequest() : document.forms);
if ( !fW || fW == undefined) {
fW = ( formWarpRequest_THIS_ ? formWarpRequest_THIS_ : formWarpRequest_NS_ );
}


var list = fW._oLstChoicesChkbox1;
  
list[0].checked=true;

list[3].checked=true;
</script>
 

Why are the selected values in the the checkbox not showing as selected in the Prompt Page Checkbox?  How do I get them to show as being selected ?

 

Thanks,

-Dave