|
|
Subject:
Hide - Show a list of links
Category: Computers > Internet Asked by: trimidium-ga List Price: $2.00 |
Posted:
05 Feb 2004 12:46 PST
Expires: 06 Mar 2004 12:46 PST Question ID: 303853 |
I want to have a link on my page that could be clicked on one side of the screen and on the other side of the screen an entire set of links appear. I would prefer it is in php or css but html, javascript are fine... What I don't want to do is load the content in a seperate frame/iframe i want to have like 10 categories of links and onmouseover the links inside the category appear, but in a different positioned location on the page. example of what i want it to do: <a href="#buyme" onmouseover="this.className='hide-show-buyme-list'; 'hide-all-other-lists;'">Buy Me</a> <a href="#buyme2" onmouseover="this.className='hide-show-buyme2-list'; hide-all-other-lists;'">Buy Me2</a> <span class="hide-show-variable-or-something1" name="buyme"> <a href="link1.htm">link1</a><br> <a href="link2.htm>link2</a><br> </span> <span class="hide-show-variable-or-something2" name="buyme2"> <a href="link3.htm">link1</a><br> <a href="link4.htm>link2</a><br> </span> as far as i know this should be a basic and easy thing to do with a variable and php or even positioning on css, i just haven't gottent it to work right. The structure doesn't have to match mine at all, just needs to get the job done. Thanks in advance. |
|
Subject:
Re: Hide - Show a list of links
Answered By: mosquitohawk-ga on 05 Feb 2004 19:43 PST Rated: |
Greetings trimidium-ga, What a great question for me, I just had to overcome this obstacle the other day for a client's site I was designing. I came across a script from Dynamic Drive <http://www.dynamicdrive.com/> that will do exactly what you're wanting. It's called the "Switch Content Script", is compatible with all versions of Internet Explorer 4 and above, as well as Netscape 6. This script utilizes a javascript placed in the <head> section of your webpage, and then uses the following structure in the page: BEGIN CODE ============================== <h3 onClick="expandcontent('sc1')" style="cursor:hand; cursor:pointer">What is JavaScript?</h3> <div id="sc1" class="switchcontent"> JavaScript is a scripting language originally developed by Netscape to add interactivity and power to web documents. It is purely client side, and runs completely on the client's browser and computer. </div> <h3 onClick="expandcontent('sc2')" style="cursor:hand; cursor:pointer">Difference betwen Java & JavaScript?</h3> <div id="sc2" class="switchcontent"> Java is completely different from JavaScript- the former is a compiled language while the later is a scripting language. </div> ============================== END CODE The 'hidden' content does not necessarily have to follow the 'onClick' element, and of course the 'onClick' element can be assigned to an HTML anchor element (ie: <a href="#" onClick="expandcontent('sc2')"> ) You can view an example and all the source files on Dynamic Drive, here: http://www.dynamicdrive.com/dynamicindex17/switchcontent.htm Also, if you need specialized help customizing the script, you can find help for Dynamic Drive scripts here: http://codingforums.com/forumdisplay.php?s=&forumid=14 Best of luck, mosquitohawk-ga |
trimidium-ga
rated this answer:
Thank You... It should work nicely for what i need ;) |
|
Subject:
Re: Hide - Show a list of links
From: sfxmystica-ga on 24 Mar 2004 13:12 PST |
Perhaps you might this useful too ... http://www.brainjar.com/dhtml/menubar/ |
If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you. |
Search Google Answers for |
Google Home - Answers FAQ - Terms of Service - Privacy Policy |