Page 1 of 1

ADVANCED PHP QUESTION

Posted: Mon Jun 23, 2003 8:09 am
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.

Posted: Mon Jun 23, 2003 8:46 am
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)?

Posted: Mon Jun 23, 2003 12:32 pm
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.

Posted: Mon Jun 23, 2003 7:34 pm
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 ;)

Posted: Mon Jun 23, 2003 7:46 pm
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