FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Dynamically changing links in a web page menu when a link is clicked
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Dynamically changing links in a web page menu when a link is clicked [message #182198 is a reply to message #182189] Thu, 18 July 2013 16:36 Go to previous messageGo to previous message
Martin Leese is currently offline  Martin Leese
Messages: 23
Registered: June 2012
Karma:
Junior Member
Jason Bodine wrote:
> Hi all,
> Please excuse me if this question has been asked before, but I am new to php and can't seem to find the answer to my question anywhere.
>
> 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. For example, if someone were to click on "About" in the menubar, the sidebar would display different "About"-related hyperlinks ("About Us", "Management", "Our Staff", "Job Opportunities," etc.) and then, if the user then selects "Products and Services" from the top menu, the side menu would change with a list of new links related to that one.
>
> Is this possible, and if so, how do I do this? Any help is appreciated!

Other people have suggested using AJAX.
Alternatively, you could include all the
options as HTML in your sidebar, but then
make all but one of them invisible using
the CSS {display: none;}. Then, when the
user clicks on a link in the menubar, use
JavaScript to change what HTML is made
visible in the sidebar.

Whichever way you do this, PHP will not do
it. PHP just generates HTML (perhaps in
response to a JavaScript AJAX request).
This is therefore the wrong newsgroup.

--
Regards,
Martin Leese
E-mail: please(at)see(dot)Web(dot)for(dot)e-mail(dot)INVALID
Web: http://members.tripod.com/martin_leese/
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Variable variables?
Next Topic: Major trouble with PhpDocumentor
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sat Nov 09 23:32:24 GMT 2024

Total time taken to generate the page: 0.05287 seconds