Hi,
Please let me the code for to Show or Hide any Element in the cognos 10.2.2, using Javascript.
Thanks ,
Aravind
Wouldn't you be better with render variables? Javascript is prone to getting broken with new releases etc.
Hi,
Surround the element with two HTML one before it and one after
put in the first HTML
<div id="myDIV" >
and for the other HTML
</div>
then from java-script we will set (style="display:none" ) to the div
so add another HTML in and put code like that
<script>
function hideElelment()
{
document.getElementById("myDIV").style.display = "none";
}
</script>
<button type="button" onclick="hideElelment();" > Click Me!</button>
While javascript will work, I'd have to agree with BigChris that you should avoid using it if there is a native, out-of-the-box way to accomplish the same thing.
Also bear in mind that when you move to Cognos Analytics (Cognos 11), JavaScript is not supported at all when the viewer is in interactive mode. Why would you code your way into a blind alley like this when there are suitable alternatives that will continue to work?
MF.