CodeCharge Studio
search Register Login  

Web Reporting

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

YesSoftware Forums -> CodeCharge Studio -> PHP

 Show / Hide based on url

Print topic Send  topic

Author Message
minder

Posts: 2
Posted: 02/13/2008, 2:19 AM

I have two grids on a page and would like to hide one based on the url
So I need to show the first grid if url is ?section=sport
and the second if the url is ?section=sport&category=soccer

I also have a nav bar on the page which shows categories for the section in the url
so as you can see I need to keep the section= in the url
Hope this makes sense
I can achieve this using IDs like ?section=1 & category=2 but prefer to use names.
any suggestions
Thanks
View profile  Send private message
mamboBROWN


Posts: 1713
Posted: 02/13/2008, 7:46 PM

minder
All you need to do is on the page with the two grids (assuming that they are in panels) in the event Before Show use the CCS function CCGetParam to obtain the value of section and category (from the url) and then turn your panels off and on. Hopefully this will make sense.

These links may help you:
http://docs.codecharge.com/studio40/html/Components/Fun...tParam.html?toc
http://docs.codecharge.com/studio40/html/ProgrammingTec...l/Overview.html
View profile  Send private message
minder

Posts: 2
Posted: 02/15/2008, 9:36 AM

Thanks for your reply mamboBROWN
I have read the references you gave but i still don't understand it.
I will play around with it again tonight and see if I can get a handle on it

Minder
View profile  Send private message
Minder2

Posts: 3
Posted: 03/08/2008, 1:15 PM

Following on from the above


my url php?section=Stats&category=Fixtures
or php?section=Stats&category=Results

Fixtures and Results are seperate components on the same page

I can hide either depending on the url like so

// -------------------------
if (CCGetFromGet("category","Fixtures") == "Fixtures")
$Component->Visible = True;
else
$Component->Visible = False;
// -------------------------

My problem is if my url is php?section=Stats Both components are visible and with this url I would like to hide both

How can I work the section=Stats in to the if statment or is there another way I might do this

Thank You
View profile  Send private message

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.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


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