sorenchr Posted May 8, 2008 Share Posted May 8, 2008 Hi, Since i fancy PHP , i prefer to do it over javascript. So i was wondering if it's possible to do an expand/collapse menu in PHP? For example, i have this userlist: Ben Garry John So when i click Garry, some options for this user should appear: Ben Garry |- Kick user |_ Ban user John Thanks for your replies! Best regards Soren Quote Link to comment Share on other sites More sharing options...
rhodesa Posted May 8, 2008 Share Posted May 8, 2008 That will be a JavaScript solution Quote Link to comment Share on other sites More sharing options...
DeanWhitehouse Posted May 8, 2008 Share Posted May 8, 2008 AJAX? Quote Link to comment Share on other sites More sharing options...
rhodesa Posted May 8, 2008 Share Posted May 8, 2008 Check out the many javascript libraries like this one: http://extjs.com/products/extjs/ Quote Link to comment Share on other sites More sharing options...
BlueSkyIS Posted May 8, 2008 Share Posted May 8, 2008 yes, PHP is a server-side language. to modify objects in a browser you need to use a browser-side language like Javascript with CSS. if you need the content to change dynamically based on user selections, you may need ajax. if your selections will always be the same, just javascript/CSS is fine. Quote Link to comment Share on other sites More sharing options...
sorenchr Posted May 8, 2008 Author Share Posted May 8, 2008 So i need ajax if the userlist is dynamic? Quote Link to comment Share on other sites More sharing options...
rhodesa Posted May 8, 2008 Share Posted May 8, 2008 Nope...use PHP to generate the entire tree, but with all children hidden with CSS Then Javascript to show/hide the child elements with onclick events Quote Link to comment Share on other sites More sharing options...
sorenchr Posted May 8, 2008 Author Share Posted May 8, 2008 Thanks for your answers Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.