View Full Version : Problems with Open links in new window Script

11-14-2005, 10:36 AM
Hi there,

I'm trying to get the open links in new windows script (http://www.dynamicdrive.com/dynamicindex8/newwindow.htm) working. I created a test page here (http://www.shehaal.com/link.htm), which works fine... but when I try to insert it verbatum onto my main site (http://jokes.shehaal.com/), 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,

11-14-2005, 05:36 PM
Looks like a script conflict. To begin with, your full page has an onload event in its body tag:

<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):


Now we need to combine this event with the existing body event, like so:

<body onload="inithyperlinks();javascript:getBlogDescription();">

If that creates other problems use:

<body onload="inithyperlinks();getBlogDescription();">

Either way, there might be yet other problems but, this must be fixed first.

11-16-2005, 01:42 PM
Of course! I can't believe I missed that... :)

Thanks heaps for your help jscheuer1. :)