COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: cogmog on 03 Apr 2009 01:44:28 PM

Title: listbox auto select
Post by: cogmog on 03 Apr 2009 01:44:28 PM
I have the following code that auto selects a default value once the prompt page loads...however if I decide to pick something other than the default then hit the 'Reprompt' button, my form goes back to the original default and not my newly selected value.

Below is what my javascript looks like:

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

I need to add some extra code that handles if the value in the listbox changes and the reprompt button is selected to maintain the New value.