Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Show/Hide working for HTML view but not for WEB view
pm.nayak84
Hi All ,
I am attaching a report here which has got a show/hide HTML button at the top . I am calling a function through onclick event and the function desrcription is wrinnten on another HTML button at the bottom .
When i go for HTML preview Show/Hide control works fine and hides the date value shown just below . I am facing issue when i generate a WEB preview , the Show/Hide does not do anything .
Please let me know what to be done to include the script fuction as part of the code .
Find more posts tagged with
Comments
JasonW
Change you script to look like:
<script language="javascript">
var bToggleValue = false;
//toggleGridVisibility("mygrid");
function toggleGridVisibility(elementname)
{
if (bToggleValue) {
//document.getElementById(elementname).style.display="inline";
document.getElementById(elementname).style.visibility="visible";
}
else {
//document.getElementById(elementname).style.display="inline";
document.getElementById(elementname).style.visibility="hidden";
}
bToggleValue = !bToggleValue;
}
</script>
And then the button to
this.onclick = function(event)
{
alert("click");
toggleGridVisibility("js3_mygrid");
}
I believe in that version "js3_" is prepended to the grid name when generating ids.
Jason