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 in Cognos8.3 - Hidden prompts

Started by mycognos, 04 Nov 2008 09:13:18 AM

Previous topic - Next topic

mycognos

Hi,

We have upgraded cognos8.2 to 8.3, after that we got some issues in the existing reports where we have some hidden prompts. The prompt submission was done with the help of html item which is having Java Script in that. Thefunction we used is 8.2 was:

<script language="javascript">
document.forms["formWarpRequest"].elements["_oLstChoicesABC"].selectedIndex = 0;
function populateValuePrompt()
{
promptButtonFinish()
}
</script>

In the above code ABC is the name of the hidden prompt.

Since the function document.forms["formWarpRequest"].elements["_oLstChoicesABC"].selectedIndex = 0; will not work in 8.2 we changed that to
getFormWarpRequest()._oLstChoicesABC.selectedIndex = 0;

The above function is working in some of the reports but still there is problem with some of the reports.

The button used to submit the values is having the below code:

<button type="button" name="finishCheckDate" id="finishCheckDate" class="clsPromptButton" style="background-color:#B9D7EC;color:black;border-top-style:outset;border-bottom-style:outset;border-left-style:outset;border-right-style:outset;border-top-width:1pt;border-bottom-width:1pt;border-left-width:1pt;border-right-width:1pt" onmouseover="this.className = 'clsPromptButtonOver'" onmouseout="this.className = 'clsPromptButton'" onClick="populateValuePrompt()"><span tabIndex="0" style="font-family:Arial;font-size:9pt;font-weight:bold;font-style:normal;" class="textItem">Finish </button>

Can anyone pls help me in finding the problem? I am not sure whether the problem is with the submit button or with the function used to select the hidden prompt values.

DanSev

try something simpler - use the array reference like this:

   document.formWarpRequest._oLstChoices123[0].selected = true;

Why are you creating a meta button in the script? Just use a regular prompt button to do it.

mycognos

hey, DanSev

Thank you very much....

The code(document.formWarpRequest._oLstChoices123[0].selected = true;) is working fine.

Thanks again..