BIRT Exchange Forum: Show/Hide working for HTML view but not for WEB view - BIRT Exchange Forum

Jump to content


 

No Latest Open Poll.

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Show/Hide working for HTML view but not for WEB view Script is getting ignored through WEB view Rate Topic: -----

#1 User is offline   pm.nayak84 Icon

  • Member
  • PipPip
  • Group: Members
  • Posts: 23
  • Joined: 11-March 11


Posted 02 March 2012 - 01:53 AM

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 .

Attached File(s)


Priya
(Every Exit Is An Entry SomeWhere Else ........)
0

#2 User is offline   JasonW Icon

  • Senior Member
  • Icon
  • View blog
  • Group: Administrators
  • Posts: 2505
  • Joined: 08-August 07


Posted 05 March 2012 - 12:34 PM

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
0

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users