You are here: Need help to code collapsing menu « PHP Language « IT news, forums, messages
Need help to code collapsing menu

Posted by rigga on 07/08/05 21:08

Hi,

I am trying to code a menu for a webpage, the menu is broken up to groups
i.e:

Home
Group1
menuitem1
menuitem2
menuitem3
Group2
menuitem1
menuitem2
menuitem3
And so on.

What I want to achieve is that the groups are shown in a collapsed state
depending on the page which is currently being displayed i.e so it starts
out like this

Home
Group1
Group2

If you click on Group1 it loads the first menuitem page and highlights it
and redraws the page expanding that group i.e. (note * denotes highligthed)


Home
Group1
*menuitem1*
menuitem2
menuitem3
Group2

And the same would apply if you click on Group2 i.e:


Home
Group1
Group2
*menuitem1*
menuitem2
menuitem3

What is the best way to go about this? I have coded it 'the long way' where
there is lots of duplication of code.

I hope this all makes sense and that I have explained it clearly.

I am new to php so would really appreciate your help as I am totally at a
loss on how to best do this.

Many thanks

Rigga

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация