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

JS Codes to check values in Check box Prompt(8.4)

Started by Ann, 19 Oct 2011 08:54:54 AM

Previous topic - Next topic

Ann

Hi Guys,

I have checkbox prompt which has 3 values. Also i have added an 'All' in static choice.
Now my requirement goes like this..
If the user hits the finish button without selecting any values(after deselecting all), then the page should get refreshed and show All as selected.

So I need two codes..
1. To check if any value has been selected
2. make the first value(option) in the list as selected


Now I already tried the below codes and it throws an error..

function abc()
{var a=0;
   var fW = (typeof getFormWarpRequest == "function" ? getFormWarpRequest() : document.forms["formWarpRequest"]);
   var list = fW._oLstChoicesSprompt;
for (i = 0; i < list.length; i++) {
      if (list.options.selected) ...


Any clues ..? please help..