PDA

View Full Version : AnyLink Drop Down Menu



Penfold
09-05-2008, 03:23 PM
1) Script Title: AnyLink Drop Down Menu

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

3) Describe problem: I apologise if the following Q's have already been covered, but after extensive searching i couldnt find them on the site - if they are around and you have a link would be great to have it/them. Thanks

Q1. I cant seem to work out how to incorporate a swap image for the 'trigger'
Q2. Is it possible to 'strip out' the css and js, put them in their own files and link to them from the page that the menu is on? I have tried doing it but with little skill/knowledge it didnt work, but that certainly doesnt mean it wont work! lol

Many thanks in advance for any and all help

Pen

ddadmin
09-05-2008, 08:53 PM
Regarding a swap image, I gather you mean for the anchor link itself? Whereas by default you'd have:


<a href="default.htm" onClick="return clickreturnvalue()" onMouseover="dropdownmenu(this, event, menu1, '150px')" onMouseout="delayhidemenu()">Web Design</a>

Instead this may look something like:


<a href="default.htm" onClick="return clickreturnvalue()" onMouseover="dropdownmenu(this, event, menu1, '150px')" onMouseout="delayhidemenu()"><img src="off.gif" onMouseover="this.src='on.gif'" onMouseout="this.src='off.gif'" /></a>

Regarding #2, simply save everything inside the <script> tags in a separate file (ie: anylinkmenu.js), and everything inside the <style> tag a file such as anylinkmenu.css. Then in the HEAD section of your page, reference these two files:


<link rel="stylesheet" type="text/css" href="anylinkmenu.css" />

<script src="anylinkmenu.js" type="text/javascript">

/***********************************************
* AnyLink Drop Down Menu- Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/

</script>

Penfold
09-07-2008, 07:54 AM
Many thanks for the reply. Works a treat - I had forgotten to close the script tag - doh!. Swap Image works fine but a couple of other 'issues' have raised their ugly mugs!

For some reason, the drop down menu actually drops up and also the link in the anchor image (as used in the swap image) doesnt go anywhere (I have set the link to http://www.google.co.uk and this shows in the staus bar when you hover over the anchor image but doesnt go anywhere when you left click it - when you right click and 'open in new tab' google opens fine in the new tab).

I havent changed any of the script/css at all and would really appreciate a bit more of a steer

Many thanks

Pen

clina
09-23-2008, 07:36 PM
I am using the same script, and I noticed in the CSS version it has a line that looks like this:

var enableanchorlink=1 //Enable or disable the anchor link when clicked on? (1=e, 0=d)

But the "AnyLink Drop Down Menu" doesn't have that option, and I can't get the anchor link to work unless I right click on it either. Any help?