Toggle table visibility [message #138405] |
Thu, 02 March 2006 19:33 |
Eclipse User |
|
|
|
Originally posted by: dave.gross.logiclibrary.com
I want to toggle the visibility of a table in my report by clicking on a
button of some sort. I stole the idea from the viewer which uses a "+" or
"-" twisty-type "control" to expand and contract the error messages. E.g.,
in a Text (HTML/Dynamic) item:
<span id="twisty_01" style="cursor:pointer"
onclick="if (document.getElementById('content_01').style.display == 'none')
{
document.getElementById('twisty_01').innerHTML = '-';
document.getElementById('content_01').style.display = 'block';
} else {
document.getElementById('twisty_01').innerHTML = '+';
document.getElementById('content_01').style.display = 'none';
}" > + </span>
<pre id="content_01" style="display:none;" >Hide Me!</pre>
That works great. But how do the same thing for a table? I'm new to this
object model and don't understand how to get a handle to my table and then
manipulate its properties.
Thanks,
-- Dave
|
|
|
Re: Toggle table visibility [message #138579 is a reply to message #138405] |
Thu, 02 March 2006 22:27 |
Eclipse User |
|
|
|
Originally posted by: vladperl.semanticprogrammer.org
Check out visibility property in Property Editor - Table
you could use value of parameter to define visibility of table
example:
params["groupingBySite"]
|
|
|
Re: Toggle table visibility [message #138635 is a reply to message #138579] |
Thu, 02 March 2006 23:56 |
Eclipse User |
|
|
|
Originally posted by: dave.gross.logiclibrary.com
"Vladimir" <vladperl@semanticprogrammer.org> wrote in message
news:du7ret$esu$1@utils.eclipse.org...
> Check out visibility property in Property Editor - Table
>
> you could use value of parameter to define visibility of table
>
> example:
>
> params["groupingBySite"]
>
>
Yes, I know that works. I am trying to avoid bringing up a property dialog
to change the visibility. If there is a way to get at the property from my
HTML javascript snippet and set the property, I'd be willing to try that.
Any ideas?
Thanks,
-- Dave
|
|
|
Re: Toggle table visibility [message #139004 is a reply to message #138635] |
Fri, 03 March 2006 17:09 |
Eclipse User |
|
|
|
Originally posted by: vladperl.semanticprogrammer.org
> Yes, I know that works. I am trying to avoid bringing up a property
> dialog to change the visibility. If there is a way to get at the property
> from my HTML javascript snippet and set the property, I'd be willing to
> try that. Any ideas?
I don't know the best way to do it.
One idea - to use global java script variable.
You could define value of the variable using your snippet.
I'd like to know your solution in case you will have one.
Tnank you,
Vladimir
|
|
|
Re: Toggle table visibility [message #139015 is a reply to message #138405] |
Fri, 03 March 2006 17:17 |
Eclipse User |
|
|
|
Originally posted by: dave.gross.logiclibrary.com
Here is my solution.
1. I set an ID for the table by setting the Bookmark property to a quoted
value ('my_table').
2. Created a custom style called "Toggle Visibility" and set the Text
Block/Display property to None.
3. Set the style on my table to this new style.
4. Created a Text/(HTML/Dynamic) field in a cell with the following
contents:
<span id="twisty_01" style="cursor:pointer"
onclick="if (document.getElementById('my_table').style.display == 'none')
{
document.getElementById('twisty_01').innerHTML = '-';
document.getElementById('my_table').style.display = 'block';
} else {
document.getElementById('twisty_01').innerHTML = '+';
document.getElementById('my_table').style.display = 'none';
}" > + </span>
-- Dave
|
|
|
Re: Toggle table visibility [message #139113 is a reply to message #139015] |
Fri, 03 March 2006 20:04 |
Eclipse User |
|
|
|
Originally posted by: vladperl.semanticprogrammer.org
> Here is my solution.
>
> 1. I set an ID for the table by setting the Bookmark property to a quoted
> value ('my_table').
>
> 2. Created a custom style called "Toggle Visibility" and set the Text
> Block/Display property to None.
>
> 3. Set the style on my table to this new style.
>
> 4. Created a Text/(HTML/Dynamic) field in a cell with the following
> contents:
>
> <span id="twisty_01" style="cursor:pointer"
> onclick="if (document.getElementById('my_table').style.display == 'none')
> {
> document.getElementById('twisty_01').innerHTML = '-';
> document.getElementById('my_table').style.display = 'block';
> } else {
> document.getElementById('twisty_01').innerHTML = '+';
> document.getElementById('my_table').style.display = 'none';
> }" > + </span>
Thank you Dave for sharing.
If I will see the way to make that solution simpler I'll let you know.
I'm sure that very soon I will need to use that functionality.
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03578 seconds