If you are unable to create a new account, please email support@bspsoftware.com

 

Java Script Error: 'document.formWarpRequest._textEditBox_12' is null or not an

Started by tosravan, 28 Aug 2007 10:07:07 AM

Previous topic - Next topic

tosravan

We have Upgraded from MR3 to Cognos 8.2. One of the report has a java script in the prompt page (check box) . Here is the code:

<input type="checkbox" name="assignvalue" onClick="document.formWarpRequest._textEditBox_12.value=getPgmid();
textBox_12.checkData();
"/> Finalize Prompt Values
<script type="text/javascript">
function getPgmid(){
var returnVal="";
if ( document.formWarpRequest._oLstChoices_program1.length > 0 ) {
   for (i=0; i<document.formWarpRequest._oLstChoices_program1.length; i++){
   if (document.formWarpRequest._oLstChoices_program1.options.selected==true)
   {
   returnVal = returnVal + ',' + new String(document.formWarpRequest._oLstChoices_program1.options.value).replace

('.0',''); }
   }
}
if ( returnVal.length > 0 )
{ return returnVal.substring(1,returnVal.length);}
else
{ return "ALL"; }
}
</script>

The same code works fine in MR3. In Cognos 8.2 when the checkbox is selected on the prompt page i get the following error:

Error: 'document.formWarpRequest._textEditBox_12' is null or not an object

COGNOiSe administrator

The HTML composition of prompt pages in 8.2 did change, so you will have to rewrite your JavaScript. If you post an entire report specification based on GOSAR we might be able to help you out.

tosravan

Thank you very much.

I do not have the GOSLR installed. I may not be able to sent the specs.

COGNOiSe administrator

Well, in that case try to search this forum for JavaScript. There is abunch of posts here on how to find, reference and manipulate prompts properly. Maybe they will give you some ideas how to fix your code ...