Hi All
I have report with 2 value prompts. The user can select either one of the prompts. So if he selects one the other has to be hidden. I am trying to do this with javascript
<script language="Javascript">
function m_click()
{
lochide();
}
function lochide()
{
var sec=document.formWarpRequest.elements["_oLstChoiceslocation"];
sec.style.visibility="hidden";
}
var Lbox = document.formWarpRequest.elements["_oLstChoicesorgarea"];
Lbox.onchange = m_click;
</script>
when i select one value prompts the other becomes hidden but only of a few seconds. I becomes hidden and again shows back.
Appreciate any help
Thanks
Have you thought about using Conditional Blocks or render variables to accomplish what you want? Either approach would allow you to hide an object, like the value prompt. In my experience, Javascript often "breaks" when the Cognos platform is upgraded and our group tends to use it only when we can't get the needed functionality from the product.
If you set the "Auto-Submit" property of the first prompt to 'Yes', you can evaluate the NULL status of the parameter and then conditionally render the second value prompt. Or vice-versa.