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

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

Javascript Issue in 11.0.5

Started by Arumugam, 25 Sep 2017 04:36:09 AM

Previous topic - Next topic

Arumugam

Hi ,

  We have migrated the reports from 10.2.2 to 11.0.5 and some of the JS are not working.I have tried to one to set the prompt value for multiselect check box value prompt(values are derived from query).Though the value is showing as checked,the selected value is not passing to page from prompt page

<script language="javascript">
var fW = (typeof getFormWarpRequest == "function" ? getFormWarpRequest() : document.forms["formWarpRequest"]);
if ( !fW || fW == undefined)
   { fW = ( formWarpRequest_THIS_ ? formWarpRequest_THIS_ : formWarpRequest_NS_ );}
 
fW._oLstChoicesJS[0].click();

//alert(fW._oLstChoicesJS[0].value);


</script>

patton

Arumugam, are you running reports with "Run with full interactivity" set to "Yes"? Because HTML items won't work in interactive mode.

Arumugam

Interactive mode is set to No

Arumugam

Any one else facing the same issue(default selection for multi select checkbox using javascript) in 11.0.5?

dougp

Your code looks like something from an ancient version of Cognos.  I would not expect that to work in Cognos 11.x.  Read the documentation for the Prompt API (version 11 or version 10) for syntax that is more likely to survive an upgrade.

Arumugam

Can you please share the link for that?

I am running the report with interactive mode as "No" in 11.0.5 and all my code is working fine in 10.2 thats why i got confused.If version 10 .x and 11.x supports same javascript syntax then my report should work fine

Arumugam

Code is working fine in one lab version and not in other(we have two different lab version installed in different servers).Both servers are installed with cognos 11.0.5.I have tested the reports in same browser(same version).Will I need to check any other configuration settings?

dougp

To find the documentation for the Prompt API, click on the Help button in Cognos.

MR1690

Hi Arumugam,

How did you resolve the issue ? I am facing the same issue,we have cognos 11.1 installed in two servers,the JS is working in one and not in another.

Mustang030

Quote from: MR1690 on 27 Apr 2021 09:25:28 AM
Hi Arumugam,

How did you resolve the issue ? I am facing the same issue,we have cognos 11.1 installed in two servers,the JS is working in one and not in another.

Hi, MR1690!
You need to use understand how JS is working in Cognos 11. In older version (10, 8) you could use JS on your report page with HTML tag.
In new version of Cognos you need to use JS modules with Custom user controller element in tools.
Also you can find, how to use them in Cognos examples. And you can find them in samples location.

dougp

That's not necessarily true.  CA 11.1.x can still use JavaScript in HTML items in the compatible viewer.

Perhaps MR1690 can provide sufficient detail for someone to be able to help.
What style of JavaScript?
Are the reports identical, including which viewer is being used?
Are both servers running (or not running) SSL?
Are the server configurations identical except for the URI values?  (same folder structures, etc.)
What do you mean by "not working"?  Are there error messages?
Are the JS modules identical on both servers, or are both servers using the same JS repository?