Results 1 to 3 of 3

Thread: Problems with Open links in new window Script

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

    Default Problems with Open links in new window Script

    Hi there,

    I'm trying to get the open links in new windows script working. I created a test page here, which works fine... but when I try to insert it verbatum onto my main site, it just opens all the links in the current window. I have been over it a thousand times and can't see what's causing it. Any ideas?!



    Thanks heaps,
    Stuart.

  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

    Looks like a script conflict. To begin with, your full page has an onload event in its body tag:

    Code:
    <body onload="javascript:getBlogDescription();">
    The script for links in a new window also has its own onload event (find this line in that script and remove it):

    Code:
    window.onload=inithyperlinks
    Now we need to combine this event with the existing body event, like so:

    Code:
    <body onload="inithyperlinks();javascript:getBlogDescription();">
    If that creates other problems use:

    Code:
    <body onload="inithyperlinks();getBlogDescription();">
    Either way, there might be yet other problems but, this must be fixed first.
    - John
    ________________________

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

  3. #3
    Join Date
    Nov 2005
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Of course! I can't believe I missed that...

    Thanks heaps for your help jscheuer1.

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
  •