Results 1 to 3 of 3

Thread: AnyLink open new window

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

    Default AnyLink open new window

    I would like to open a new browser window when my users click on a menu item. It doesn't seem like I can include an onclick method in the <a> tag because this doesn't work:

    menu_10[11] = "<a href='#' onclick='alert('click')' >Page 1</a><br /> ";

    Is there a solution to this problem? I only need it to work in IE.

    Thanks, Alex

  2. #2
    Join Date
    Jan 2005
    Posts
    40
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    this part:

    onclick='alert('click')'

    does not work because of your use of single quotes. Place alert text into variable and display it without quotes. Theoretically, even this will work:
    onclick=alert('click')

  3. #3
    Join Date
    Dec 2004
    Posts
    177
    Thanks
    0
    Thanked 18 Times in 17 Posts

    Default

    or...
    menu_10[11] = "<a href='#' onclick='alert(\'click\')' >Page 1</a><br /> ";
    Verzeihung!

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
  •