COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: axis on 17 Sep 2008 09:45:10 AM

Title: Value Prompt with Javascript
Post by: axis on 17 Sep 2008 09:45:10 AM
Hi All,
I have insert a javascript where i delete the first two row of value prompt..
Now I need to use the new first value like filter when i launch first time report ...
Do you have a solution to this problem?
Thanks!!

Title: Re: Value Prompt with Javascript
Post by: Zucethy on 02 Dec 2008 08:26:31 AM
Do you have the old one code that you used to delete those values?
Title: Re: Value Prompt with Javascript
Post by: Suraj on 02 Dec 2008 11:30:56 AM
Add another line in the javascript to select the first value from the index.
Title: Re: Value Prompt with Javascript
Post by: DanSev on 04 Dec 2008 11:33:47 AM
The code has changed in newer versions of cognos.

use:
<script>

   document.formWarpRequest._oLstChoicesPROMPTNAME[1].remove;
   document.formWarpRequest._oLstChoicesPROMPTNAME[0].remove;
   document.formWarpRequest._oLstChoicesPROMPTNAME.removeAttribute('hasLabel');
</script>

Here is the support document on cognos's site: 1039231 Javascript: Removing first 2 items from a value prompt in Cognos8.3.