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

Java Script Issues when Upgrade Cognos 8.2 to10.2

Started by simi, 01 Jan 2013 09:31:16 PM

Previous topic - Next topic

simi

Hi All,

We are upgrading the reports from Cognos 8.2 to Cognos 10.2. we are facing most of the issues related to java script in the prompt pages. Can you please help out to find the solution to find the following code which is not working in 10.2?

<script language='JavaScript'>

function checkBoxCaseID.selectAll()

{
alert("message");
}

</script>

abhishek.sanghani

With IBM Cognos 8.3, the report viewer architecture has been majorly changed. Before IBM Cognos 8.3, it was a common practice to define a NAME or ID for the prompt controls and use that to manipulate controls at runtime through JavaScript.
However, version 8.3 onwards, the IDs of the controls are generated randomly and are not fixed. So, it is a little difficult to get hold of a control. For this reason, we have defined a SPAN around the control that we want to manipulate.
By wrapping the control within SPAN tags, we will reduce the scope of our search in JavaScript.

bdbits

For 8.3 and later you need code like the following:

var fW = (typeof getFormWarpRequest == "function" ? getFormWarpRequest() : document.forms["formWarpRequest"]);
  if (!fW || fW == undefined) { fW = ( formWarpRequest_THIS_ ? formWarpRequest_THIS_ : formWarpRequest_NS_ ); }
  return fW;

Then you can reference controls like this:
  fW._oLstChoicespromptNameOfMyPromptControl

But since you are now on 10.2 and are going to have to update your javascript anyway, you may as well check out the new prompt API.

http://pic.dhe.ibm.com/infocenter/cbi/v10r2m0/topic/com.ibm.swg.ba.cognos.ug_cr_rptstd.10.2.0.doc/c_prmpt_api_overview.html