Results 1 to 6 of 6

Thread: anylink vertical menu

  1. #1
    Join Date
    Oct 2004
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default anylink vertical menu

    1) Script Title: anylinkvertical

    2) Script URL (on DD):http://www.dynamicdrive.com/dynamici...nkvertical.htm

    3) Describe problem:
    No Problems, works just great ,but I was looking at your forum at-http://www.dynamicdrive.com/forums/archive/index.php/t-13728.html
    and I would like to apply to -anylinkverticalmenu- the same feature to open
    in a -POP UP WINDOW- the FREE JAVA SCRIPT link in Menu 2 of ANYLINKVERTICALMENU.
    Is it possible? Thanks

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

    Default

    The easiest way to get a link within the drop down menu to open in a customized pop up is to use the onClick event handler inside the menu item's <a> element. So instead of say:

    Code:
    menu1[0]='<a href="http://www.javascriptkit.com">JavaScript Kit</a>'
    Change that to:

    Code:
    menu1[0]='<a href="#" onClick=\'window.open("http://www.javascriptkit.com", "", "width=700px,height=800px,scrollbars,resizable"); return false\' >JavaScript Kit</a>'
    Be careful when nesting apostrophes- any slight misstep will cause a JS error. You can find a list of window attributes to use to customize the window (ie: scrollbars) at the bottom of this page: http://www.javascriptkit.com/jsref/window.shtml

  3. #3
    Join Date
    Oct 2004
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks for your reply, I tried it but doesn't work, I got a new idea using your Ajax Widgets at-http://www.dynamicdrive.com/dynamicindex8/dhtmlwindow/index.htm
    Window 3 (Ajax content)
    It would do the same even better, one only problem works with HTML pages, not with PHP pages, mine is a PHP. I remember there is an issue with server side loading on Ajax , do you know the fix? Thanks again

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

    Default

    Regarding the code I posted, I had tested it out, and it does work. Can you tell me what error you got when using it?

    I've attached a working example below (demo.txt).

  5. #5
    Join Date
    Oct 2004
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I deleted that code trying to get the Ajax going. In anyway I got it back on just to try it but it seems is not working. I posted it on a temp site for you to take a look at it.
    www.temp.myhighstreet360.co.uk
    since I have a php page, I have replaced that part of code, the rest is copy and paste from your TXT demo.
    I believe that the AJAX is still a better choice because doesn't have the detrimental effect of pop ups to disappear if the user clicks somewhere else on the page and also looks cleaner.
    Appreciate your help.

  6. #6
    Join Date
    Oct 2004
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Please disregard my posting, I got it solved with AJAX Widgets. It works fine with PHP
    Thanks for your 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
  •