Results 1 to 4 of 4

Thread: AnyLink Drop Down Menu

  1. #1
    Join Date
    Sep 2008
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default AnyLink Drop Down Menu

    1) Script Title: AnyLink Drop Down Menu

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...pmenuindex.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

  2. #2
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    Regarding a swap image, I gather you mean for the anchor link itself? Whereas by default you'd have:

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

    Code:
    <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:

    Code:
    <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>
    DD Admin

  3. #3
    Join Date
    Sep 2008
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    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
    Last edited by Penfold; 09-07-2008 at 07:59 AM. Reason: spelling

  4. #4
    Join Date
    Sep 2008
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Same problem with the anchor link!

    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?

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •