Results 1 to 3 of 3

Thread: AnyLink JS Drop Down Menu and DHTML Window widget

  1. #1
    Join Date
    Mar 2009
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default AnyLink JS Drop Down Menu and DHTML Window widget

    Hi I'm using the AnyLink JS Drop Down Menu and have one of items in the list to open DHTML Window widget

    AnyLink JS Drop Down Menu:
    http://www.dynamicdrive.com/dynamici...pmenuindex.htm

    DHTML Window widget:
    http://www.dynamicdrive.com/dynamici...ndow/index.htm


    Here what I have so far, but it isn't working.
    Test.htm:
    Code:
    <html>
    <head>
        <link rel="stylesheet" href="css/dhtmlwindow.css" type="text/css" />
    <script type="text/javascript" src="js/dhtmlwindow.js"></script>
    <script type="text/javascript" src="js/anylinkmenu.js"></script>
    <script type="text/javascript" src="js/menucontents.js"></script>
    <script type="text/javascript">
    function openmypage(){ //Define arbitrary function to run desired DHTML Window widget codes
    ajaxwin=dhtmlwindow.open("ajaxbox", "iframe", "Item2.htm", "Quick View", "width=575px,height=150px,left=150px,top=100px,resize=1,scrolling=1")
    }
    </script>
    </head>
    <body>
    <a href="http://www.dynamicdrive.com" class="menuanchorclass" rel="anylinkmenu1">Menu</a>
    <script type="text/javascript">
    	anylinkmenu.init("menuanchorclass")
    	</script>
    </body>
    </html>
    menucontents.js
    Code:
    var anylinkmenu1={divclass:'anylinkmenu', inlinestyle:'', linktarget:''} //First menu variable. Make sure "anylinkmenu1" is a unique name!
    anylinkmenu1.items=[
    	["Item1", "Item1.htm"],
    	["Item2", "Item2.htm,onclick="openmypage(); return false""],
    	
    ]
    I'm sure I have something wrong with the line of Item2.
    Has anybody seen a question like this on this forum before? or know what I could do ?

    Thanks
    Last edited by rushhh; 03-30-2009 at 10:49 PM.

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

    Default

    Instead of:

    Code:
    ["Item2", "Item2.htm,onclick="openmypage(); return false""],
    Try something like:
    Code:
    ["Item2", "javascript:openmypage()"],
    DD Admin

  3. #3
    Join Date
    Mar 2009
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks so much that works.

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
  •