Springs_Goth Posted May 30, 2006 Share Posted May 30, 2006 Hi all, i searched for this topic and couldnt find anything, so any help would be greatly appreciated!!!!My site is ATORLEY. That is the address, purely for demonstration and to help me, then ill take it off. I wish to make the Navigation on the right hide certain elements when others are clicked.As you can see the navigation has "about us" underneath that i wish to write, Vision & Mission. BUT These must only show once about us has been selected. Then when another say Contact Us has been selected the Vision and Mission must hide, and something like e-mail must be shown.Do you understand? Can anyone help me? Currently i am not running much Javascript on the page...but i know that i can make this an external file and place a link to it. Link to comment Share on other sites More sharing options...
scott100 Posted May 30, 2006 Share Posted May 30, 2006 Are you talking about a menu like this one? feel free to blag the code http://scott100.atspace.com/Drop_Menu.html Link to comment Share on other sites More sharing options...
Springs_Goth Posted May 30, 2006 Author Share Posted May 30, 2006 Yes, execpt once lunch is selected Breakfast and Dinner must disapear, and viceversa. Also i see in the script, <a href="javascript:toggleMenu('menu3')">DINNER</a> that is the link to the JavaScript. However can i still link it to another link as well? Say with two href:="" ???? Link to comment Share on other sites More sharing options...
Jack McKalling Posted May 30, 2006 Share Posted May 30, 2006 (edited) No, one anchor can only link to one other something (anchor, document, script,..). But you can give the anchor a main link, and the attribute onclick="" to define the javascript for several script functions, instead of only one.Example: <a href="/Click_here_to_execute_several_things" onclick="toggleMenu('menu1'); toggleMenu('menu2'); toggleMenu('menu3'); return false">Click Here</a>Notice the ; return false instruction at the end of the onclick attribute, which deactivates the main link defined in the href attribute Edited May 30, 2006 by Dan The Prof Link to comment Share on other sites More sharing options...
scott100 Posted May 30, 2006 Share Posted May 30, 2006 Yes, execpt once lunch is selected Breakfast and Dinner must disapear, and viceversa.Yes that's possible, just add to the code that all menu's are hidden first then show the one that is clicked.Also i see in the script, <a href="javascript:toggleMenu('menu3')">DINNER</a> that is the link to the JavaScript. However can i still link it to another link as well? Say with two href:="" ???? <{POST_SNAPBACK}> change it around to this.<a href="www.google.com" onclick="java script:toggleMenu('menu3')">DINNER</a><br /> Link to comment Share on other sites More sharing options...
Springs_Goth Posted May 30, 2006 Author Share Posted May 30, 2006 Ok, thanks, i will play around tonight and see what i can do! Thanks so much.Watch this space i might be back tommorow. Link to comment Share on other sites More sharing options...
scott100 Posted May 30, 2006 Share Posted May 30, 2006 Ok, thanks, i will play around tonight and see what i can do! Thanks so much.Watch this space i might be back tommorow.<{POST_SNAPBACK}> No problem, this should help you with the hide bit:http://w3schools.invisionzone.com/index.ph...indpost&p=17063 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now