COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: avuyyuru on 31 Jul 2008 03:46:13 PM

Title: Cognos 8.3 Javascript
Post by: avuyyuru on 31 Jul 2008 03:46:13 PM
Hi,
     I am trying to implement a javascript which would default a value prompt to a specified default value. The code i use is as below:


<script type="text/javascript">
   function init()
   {   
             var fW = (typeof getFormWarpRequest == "function" ? getFormWarpRequest() : document.forms["formWarpRequest"]);
              if (fW)
                     fW._oLstChoicesTime.options[2].selected =  true;
          canSubmitPrompt();
   }
   init();
</script>

Time in the above script being the parameter name. This javascript does work when the page loads for the first time. However on selection of value other than the default value and page refresh because of other cascading prompts on the same page the value gets re-set to the default value. Has anyone got a workaround to avoid the prompt value being re-set every time the prompt page refreshes. Any help would be greatly appreciated.

Thanks,
Arun