Javascript doesn't work in portal page after upgrade to Cognos 10.2

I have a couple of reports with a small piece of javascript on the prompt page to autoselect prompt values and autosubmit the report. The javascript automatically selects the first value in prompt objects and submits the report by clicking on the ‘Finish’ butten. The script is working fine when running the report from Report Studio or Cognos Connection. But when the report is part of a multi-page portal tab the javascript doesn’t seem te work.

Do i have to use the prompt api functions to achieve this? If so can anybody provide me with an example? I’m not a javascript hero, so any help would be appreciated?



Y have experimented some troubles with Java script too, mainly produced by identificator changes in reports when displayed in different places. If you can send your code and explain a bit its functionality, maybe we can help you.

Hallo Steven, i am facing almost the same problem. But my report runs only in Out of Report studio if i try to start it from Cognos Portal it doesnt work. Could you solve your problem?

I am using following code:

<script type="text/javascript"> 

//get the form request 
var fx = (typeof getFormWarpRequest == "function" ? getFormWarpRequest() : document.forms["formWarpRequest"]); 

if (fx) 

  if (fx.elements[""].value == "RS") 
     setTimeout('oCVRS.promptAction(\'finish\')', 10); 
    setTimeout('oCV_NS_.promptAction(\'finish\')', 10); 

Kind regards

Hi Krexx,
When you see JavaScript that runs in Report Studio but not through Cognos Connection, it is often due to missing resources or a different set of Cognos script files being loaded from the server. This is sometimes out of your control. Occasionally, there are ways to work around it by finding the missing function in a built-in script that is in scope when the report or prompt page is running in Cognos Connection.

While I don’t know the specific reason why your script doesn’t work in Cognos Connection, I would suggest running the report in Cognos Connection with the F12 Developer Tools open and the Network tab enabled (if you are using IE, it is automatically enabled in Chrome and Firefox). What you may find is that a Javascript error on the console identifies what function is not in scope and available for you to call.

This doesn’t solve your problem, I know, but maybe this puts you on the right track at least. Have a great day!