CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 Dynamically Hide Table

Print topic Send  topic

Author Message
datadoit.com
Posted: 07/30/2004, 10:16 AM

CCS2; PHP4; MySQL4

How can I dynamically hide a table? The table isn't a data grid. Is this
possible?

DonB
Posted: 07/30/2004, 1:02 PM

You can incorporate the attribute and value Style="display:none" into the
<table> tag, to hide it on the client side (although it is still in the data
sent to the client). A very few browsers won't obey this attribute.

On the server side, the table could be consructed in a text string that you
load into a Label control (that's set to "html" style). Then you can load
it or not load it at your discretion.

--
DonB

http://www.gotodon.com/ccbth

"datadoit.com" <mike@datadoit.com> wrote in message
news:cedvq1$g3h$1@news.codecharge.com...
> CCS2; PHP4; MySQL4
>
> How can I dynamically hide a table? The table isn't a data grid. Is this
> possible?
>
>

datadoit.com
Posted: 07/31/2004, 7:07 AM

"DonB" <~ccbth~@gotodon.com> wrote in message
news:cee9gm$m8e$1@news.codecharge.com...
> You can incorporate the attribute and value Style="display:none" into the
> <table> tag, to hide it on the client side (although it is still in the
data
> sent to the client). A very few browsers won't obey this attribute.
>
> On the server side, the table could be consructed in a text string that
you
> load into a Label control (that's set to "html" style). Then you can load
> it or not load it at your discretion.
>
> --
> DonB
-------------------------------------

This worked like a champ! In the page's BeforeShow event, I set a tag like
such:

global $Tpl;

if (CCGetSession("GroupID") == "99") {
$Tpl->SetVar("AdminMenuShow", "");
}
else {
$Tpl->SetVar("AdminMenuShow", "display:none");
}

Then in the HTML, I placed the tag like such:

<table Style={AdminMenuShow} ...

This worked in both IE6 and Mozilla Firefox. Thanks!

Damian
Posted: 08/03/2004, 6:14 AM

Important to note here that the data is still sent to the browser - its just
not displayed. It will be visible via a View Source.

"datadoit.com" <mike@datadoit.com> wrote in message
news:ceg932$fma$1@news.codecharge.com...
> "DonB" <~ccbth~@gotodon.com> wrote in message
>news:cee9gm$m8e$1@news.codecharge.com...
> > You can incorporate the attribute and value Style="display:none" into
the
> > <table> tag, to hide it on the client side (although it is still in the
> data
> > sent to the client). A very few browsers won't obey this attribute.
> >
> > On the server side, the table could be consructed in a text string that
> you
> > load into a Label control (that's set to "html" style). Then you can
load
> > it or not load it at your discretion.
> >
> > --
> > DonB
> -------------------------------------
>
> This worked like a champ! In the page's BeforeShow event, I set a tag
like
> such:
>
> global $Tpl;
>
> if (CCGetSession("GroupID") == "99") {
> $Tpl->SetVar("AdminMenuShow", "");
> }
> else {
> $Tpl->SetVar("AdminMenuShow", "display:none");
> }
>
> Then in the HTML, I placed the tag like such:
>
> <table Style={AdminMenuShow} ...
>
> This worked in both IE6 and Mozilla Firefox. Thanks!
>
>


Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

PHP Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.