Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.php > #10146
| From | Denis McMahon <denismfmcmahon@gmail.com> |
|---|---|
| Newsgroups | comp.lang.php |
| Subject | Re: Dynamically changing links in a web page menu when a link is clicked |
| Date | 2013-07-17 23:28 +0000 |
| Organization | A noiseless patient Spider |
| Message-ID | <ks79at$psp$9@dont-email.me> (permalink) |
| References | <3b638a30-aa28-4c29-8edb-0508e376b147@googlegroups.com> |
On Wed, 17 Jul 2013 11:37:20 -0700, Jason Bodine wrote: > I am designing a website for my company. The site will have a JQuery > accordion menubar across the top and a sidebar menu as well. What I > would like to do, using php in order to save myself the trouble of > cluttering my html with menu code on every single page on the site, is > make it so that when someone clicks on a link in the menubar, the links > listed in the sidebar change according to what was clicked. To do this at the php level implies some sort of reloading of the page, or at least the sidebar (is it in a separate frame?) when the menu link is clicked, with the relevant submenu data loaded. If you want this to happen inside the page without a reload, that's something you'd want to do client side, and that's not really a php issue, although you might use an ajax request in the javascript code on the client to ask the server for the relevant menu links to display. You mention jquery - the normal suggestion in this case is to go and find a jquery forum and ask the question there. There are probably other javascript methods to do this, but they would be equally off topic here, but perhaps on topic in comp.lang.javascript - however that latter group is generally dismissive of jquery (and indeed most libraries) and will probably suggest that you find a more relevant forum. So, I think that first of all you need to decide whether: (a) the menu change is going to happen with a page reload (b) the menu is going to be in a frame and the menu frame will reload (c) the menu change is going to happen client side using submenu data provided as part of the initial pageload (d) the menu change is going to happen client side using submenu data provided in response to a menu click Then you will know what data you need to provide, when to provide it, what stimuli will trigger its provision, and whether you';re going to be working client side or server side or both. Once you know what bits you need to do server side in php, come back and ask here if you need any help with them. -- Denis McMahon, denismfmcmahon@gmail.com
Back to comp.lang.php | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Dynamically changing links in a web page menu when a link is clicked Jason Bodine <jbodine1974@gmail.com> - 2013-07-17 11:37 -0700
Re: Dynamically changing links in a web page menu when a link is clicked richard <noreply@example.com> - 2013-07-17 14:49 -0400
Re: Dynamically changing links in a web page menu when a link is clicked Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-07-17 21:25 +0200
Re: Dynamically changing links in a web page menu when a link is clicked The Natural Philosopher <tnp@invalid.invalid> - 2013-07-17 20:33 +0100
Re: Dynamically changing links in a web page menu when a link is clicked Jerry Stuckle <jstucklex@attglobal.net> - 2013-07-17 16:34 -0400
Re: Dynamically changing links in a web page menu when a link is clicked Denis McMahon <denismfmcmahon@gmail.com> - 2013-07-17 23:28 +0000
Re: Dynamically changing links in a web page menu when a link is clicked bill <william@TechServSys.com> - 2013-07-18 10:21 -0400
Re: Dynamically changing links in a web page menu when a link is clicked Martin Leese <please@see.Web.for.e-mail.INVALID> - 2013-07-18 10:36 -0600
Re: Dynamically changing links in a web page menu when a link is clicked The Natural Philosopher <tnp@invalid.invalid> - 2013-07-18 19:00 +0100
Re: Dynamically changing links in a web page menu when a link is clicked Twayne <nobody@spamcop.net> - 2013-07-27 11:36 -0400
csiph-web