CodeCharge Studio
search Register Login  

Visual Web Reporting

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

YesSoftware Forums -> Archive -> GotoCode Archive

 hiding components

Print topic Send  topic

Author Message
Ian
Posted: 11/19/2002, 8:58 AM

I'm going round in circles a little trying to finish a project. I need to hide certain components on an included page based on the main page that is in focus.

There are 4 elements that may be hidden and I'm currently using the following code which isn't getting me anywhere.

global $FileName;
global $First;
global $Second;
global $Third;

if (($FileName == default.php) or ($FileName == display.php))
{
$Second->Visible = false;
$Third->Visible = false;
}
elseif
.......

You get the idea. what happens is that when I then compile and load default I get:

Parse error: unexpected T_DEFAULT

I'd assumed that $FileName should pick up the name of the currently loaded page.
Ian
Posted: 11/21/2002, 2:46 PM

OK, resolved the T_Default bit but it still refuses to hide the grids. Any suggestions?
xbill
Posted: 11/22/2002, 8:45 AM

A couple of things that might help:

-Try some quotes around the strings and the
"||" operation for or:

ie: if (($FileName == "default.php") || ($FileName == "display.php"))

-Add some "echo" commands to the php code to print out
the value of the $FileName Variable. Make sure that it
is set to a value that you expect - and depending on your
platform watch out for capitials/lowercase

-put the hide events in the Page / After Initialize Event
on the main page object.

Hope this helps...
-bill


Ian
Posted: 11/24/2002, 1:24 PM

Fixed the first problem but have another that's playing about. Got a grid on a page that needs to be hidden depending on a value in a field from another grid. Echo back the field and all is right but it just won't hide properly. Very annoying

   


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

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


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