Results 1 to 3 of 3

Thread: anylink drop down menu

  1. #1
    Join Date
    Oct 2005
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default anylink drop down menu

    i put the code in and checked it so many times.. but i still can't figure out what's wrong.
    this is the url:
    http://lily.davidkicksass.com/welcome.php
    can someone please help me?

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Your use of the window.open() method for one of the menu elements in menu5 is OK but, single quotes (') used within the element's definition, which is already delimited using single quotes, need to be escaped. Otherwise you get what you have now, a script that doesn't know where you intend one of its array elements to end. Not really a factor is the incorrect syntax of the href and target attributes but, I've corrected that too. In other words, change this:

    Code:
    menu5[3]='<a href="ex/pluggie.php target=_blank" onclick="window.open('ex/pluggie.php','Pluggie','resizable=yes,status=yes,scrollbars=yes,width=320,height=400'); return false;">Pluggie</a><br />'
    to (additions red):

    Code:
    menu5[3]='<a href="ex/pluggie.php" "target=_blank" onclick="window.open(\'ex/pluggie.php\',\'Pluggie\',\'resizable=yes,status=yes,scrollbars=yes,width=320,height=400\'); return false;">Pluggie</a><br />'
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Oct 2005
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default it works

    thank you! it worked

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
  •