ADVANCED PHP QUESTION

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
gurjit
Forum Contributor
Posts: 314
Joined: Thu May 15, 2003 11:53 am
Location: UK

ADVANCED PHP QUESTION

Post by gurjit »

Hi all,

I want to be able to create a menu which expands and collapses when you click the links.

also i want to be able to select the menu options by clicking a checkbox.

i want for example something like this:



Code: Select all

<HTML>
<BODY>
<input type="checkbox" name="checkbox" value="checkbox">
UK <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
<input type="checkbox" name="checkbox2" value="checkbox">
London<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 
<input type="checkbox" name="checkbox3" value="checkbox">
South <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 
<input type="checkbox" name="checkbox3" value="checkbox">
East <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
<input type="checkbox" name="checkbox4" value="checkbox">
Midlands<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
<input type="checkbox" name="checkbox5" value="checkbox">
Leicetser 
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
<input type="checkbox" name="checkbox5" value="checkbox">
Manchester <br>
<br>
<input type="checkbox" name="checkbox6" value="checkbox">
USA <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
<input type="checkbox" name="checkbox2" value="checkbox">
New York<br>
</BODY>
</HTML>

the above example is the type of thing i'm looking for.
so for example if i click UK link not the checkbox, the option London appears, if i click London link then South and East appear.
If i click UK checkbox then everything underneath gets ticked.

does anyone know how to do this.

PLEASE PLEASE HELP.
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

Do you want this to instantly happen client-side (javascript) or by sending a new request receiveing a new document with the appropriate view of the tree (which might be done via php)?
User avatar
gurjit
Forum Contributor
Posts: 314
Joined: Thu May 15, 2003 11:53 am
Location: UK

Post by gurjit »

i would prefer to do it all at once rather than refresh the page.

have you got any ideas on how....i'm really stuck at the moment.
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

there are many tutorials and builder available, some for free
a quick google-search revealed e.g. http://www.treemenu.net/
haven't tested it ;)
Judas
Forum Commoner
Posts: 67
Joined: Tue Jun 10, 2003 3:34 pm
Location: Netherlands

Post by Judas »

I have writen a recursive folder image system with expanding folder list's (bec. the file's display in a difrent frame) in PHP.
So.


PHP does magic dude
Post Reply