View Full Version : Dropdown HTML control

07-09-2007, 05:09 AM
1) Script Title: Dropdown HTML Control

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex1/dropdowncontrol.htm

3) Describe problem: I cant figure out where to place the code for the dropdown. I am working a site and the url is... gianstone.com/textile i want to add a dropdown menu for the collection button that reads jewelry and frameables. How do i do this? Please be as descriptive as possible because as you can see, I am not the best with coding. thanks

07-09-2007, 07:06 AM
If you're looking to add a straightfoward drop down menu to an arbitrary image link on your page, you're probably better off with Anylink CSS menu (http://www.dynamicdrive.com/dynamicindex1/anylinkcss.htm). After following the instructions on that page, for Step 3, your HTML would look something like this:

<!--1st anchor link and menu -->

<a href="#" onClick="return clickreturnvalue()" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Collections','','images/collectionsroll_06.gif',1); dropdownmenu(this, event, 'anylinkmenu1') "><img src="images/index_06.gif" name="Collections" width="99" height="20" border="0"></a>

<div id="anylinkmenu1" class="anylinkcss">

<a href="http://www.dynamicdrive.com/">Dynamic Drive</a>
<a href="http://www.cssdrive.com">CSS Drive</a>
<a href="http://www.javascriptkit.com">JavaScript Kit</a>
<a href="http://www.codingforums.com">Coding Forums</a>
<a href="http://www.javascriptkit.com/jsref/">JavaScript Reference</a>


07-19-2007, 11:17 PM
Thank you for your help. OI am still having the same problem. When i insert the code, it just shifts my whole menu and its not a dropdown script, it just adds those links under it. You know what I mean. Like where would I place this, right where i want the button to be? I do that but then I dont get it to dropdown. Am I missing something here?

07-26-2007, 02:33 AM
So here we goo... I was able to figure out how to embed the script into my document. Howveer, there are some problems with it, the image doesnt restore on collection and I cant figure out how to add an additional one to purchase info. also, when i viewed this page on a PC in internet excplorerr, everything was really messed up. Any ideas anyone?http://gianstone.com/textile/

07-26-2007, 08:41 AM
Try moving the DIV for your submenu outside the <td> tag, so it's not nested in any other tag other than the <BODY> tag:

<div id="anylinkmenu1" class="anylinkcss" style="padding-left:9px;">

<a href="../../../gstone/Desktop/Web Design/Textile Gems/frameables.html" class="style7">FRAMEABLES</a>
<a href="http://www.cssdrive.com" class="style5 style6">JEWELRY</a>