Results 1 to 6 of 6

Thread: AnyLink Question

  1. #1
    Join Date
    Oct 2006
    Posts
    18
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Default AnyLink Question

    1) Script Title: AnyLink Vertical Menu

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

    3) Describe problem: First, I LOVE your scripts... I find them VERY user friendly. They've helped me complete many a project!

    I have a question about the AnyLink menu script. Much like the "Pop-up" question below, I'm trying to assign new window attributes to the menu. This is what I've done so far:

    menu1[1]='<a href="http://ymcajags.com" onClick="popup = window.open('http://ymcajags.com','PopupPage','height=600','width=850','scrollbars=yes','resizable=no','status=yes','toolbar=yes','menubar=yes','location=yes','screenX=0','left=0', 'screenY=0','top=0'); return false" target="_blank">Jaguar Football &amp; Cheerleading</a>'

    The page does open in a new window but the window size and location seem to get lost in the mix.

    Can you offer any suggestions?

    Also, if you're not using a <ul> or <li>, but instead placing the <div> tags within individual <td>'s, can you still set the dropdown menu farther from the right side of the main menu?

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

    Default

    At a glance I see that the syntax you're using for the window.open() method is incorrect at the end:

    Code:
    menu1[1]='<a href="http://ymcajags.com" onClick="popup = window.open('http://ymcajags.com','PopupPage','height=600, width=850, scrollbars=yes, resizable=no, status=yes, toolbar=yes, menubar=yes, location=yes, screenX=0, left=0, screenY=0, top=0'); return false" target="_blank">Jaguar Football &amp; Cheerleading</a>'
    So there should be no individual quotes surrounding each window attribute (ie: location=yes).

    Yep, DIV tags should work just as well, since it's a container element with a definable "width".

  3. #3
    Join Date
    Oct 2006
    Posts
    18
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Default AnyLink Question

    Thanks much... I'll give it a shot. I wonder if that applies across the board. I use this "pop-up" (new window) script often. It may explain some of the glitches I come across.

    Thanks again! You guys write the BEST, most reliable scripts out there and you don't overcomplicate things. I, for one, appreciate that!

    DS
    TheSmallDetails (.com)

  4. #4
    Join Date
    Oct 2006
    Posts
    18
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Default PS AnyLink

    Me again... I didn't have any luck with the new syntax you offered but I tried this instead and found it will work in IE. I've tried every conceiveable combination (apostrophes, quotation marks, spaces/no spaces) and none of them work in Firefox.

    menu1[1]="<a href='http://ymcajags.com' onClick='popup = window.open('http://ymcajags.com','PopupPage','height=600,width=900,scrollbars=yes,resizable=no,status=yes,toolbar=yes,menubar=yes,location=yes,left=0,top=0'); return false' target='_blank'>Jaguar Football &amp; Cheerleading</a>"

    I'm not ready to give up yet if you have any other suggestions!

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

    Default

    Ah I forgot that any single quotes within your window.open() string should be backslashed. This will work:

    Code:
    menu1[1]='<a href="http://google.com" onClick="popup = window.open(\'http://google.com\',\'PopupPage\',\'height=600, width=850, scrollbars=yes, resizable=no, status=yes, toolbar=yes, menubar=yes, location=yes, screenX=0, left=0, screenY=0, top=0\'); return false" target="_blank">Jaguar Football &amp; Cheerleading</a>'

  6. #6
    Join Date
    Oct 2006
    Posts
    18
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Default

    WONDERFUL... Works like a charm. Thank you SO much!!

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
  •