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

 Active menu item

Print topic Send  topic

Author Message
songohan

Posts: 89
Posted: 11/07/2008, 2:51 AM

Hi! I use menu builder in CCS4 but with no styles and remove adx javascript. This way I get bare bones unordered list menu that I can style as I wish and it suits me quite fine.

Question is, how can one know which menu item is active? I can see no flag in HTML or class that would mark clicked item.

Why can't we add custom Labels to menu? This way one could simply check for some parameter in url, compare to menu parameter and set menu item active if there is a match...

Or I completely miss something... :(

Andrej

Update:
on line 254 of Classes.php there is function "DrawMenuItem". If you comment lines 258, 260 and 261 you will notice taht all <li> got class selected. Obviously if statement fails to identify active item...
View profile  Send private message
melvyn


Posts: 333
Posted: 11/07/2008, 7:08 AM

You can know which is active using css and javascript. I don't use the menu builder. css sets the style to the active menu as applying #your-element a:active {custom color}; to do that, javascript check the current url and the url to which your link is pointing.

I recommend to use some ccs WITH styles and change them to suit your needs by changing colors, background images, and more....
_________________
Melvyn Perez
Puro Codigo
http://purocodigo.com
View profile  Send private message
songohan

Posts: 89
Posted: 11/07/2008, 7:32 AM

How do you build menu than? Custom function?

Could you send the javascript?
View profile  Send private message
melvyn


Posts: 333
Posted: 11/07/2008, 7:39 AM

Sincerely, I don't use the CCS menus, I don't like, instead I build my own using css (cascade style sheets).

Follow my second comment: build one with styles and change the colors. Also you can use whatever ccs menu and use styles in the top of your page to set the properties with some code liks
<style type='text/css'>   
#my-menu-container ul li a:hover {/* style when mouse over*/}  
#my-menu-container ul li a:active {/* style when you're located in this page*/}  
#my-menu-container ul li a:visited {/* style....*/}  
</style>
 
                  
_________________
Melvyn Perez
Puro Codigo
http://purocodigo.com
View profile  Send private message
songohan

Posts: 89
Posted: 11/07/2008, 8:00 AM

Seem we didn't understand each other.

How do you generate HTML for the menu?

Applying styles is no problem.

Also what javascript you use to decide which menuitem is active?

A.
View profile  Send private message
melvyn


Posts: 333
Posted: 11/07/2008, 8:19 AM

I only use cascade styles sheets (css), coded by hand, using lists <ul> <li>....

Check this:
http://css.maxdesign.com.au/listamatic/

Pay atention to theese links from the above page:

http://www.xs4all.nl/~peterned/examples/cssmenu.html
http://tutorials.alsacreations.com/modelesmenus/



_________________
Melvyn Perez
Puro Codigo
http://purocodigo.com
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.

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.