PDA

View Full Version : Open Links in New Window



bfboy
08-01-2005, 12:49 AM
I want to be able to use this feature but I'm having trouble. With Open links in new window FF1+ IE5+ Opr7+ (http://www.dynamicdrive.com/dynamicindex8/newwindow.htm) , I don't want the toggle and when I remove the BODY section, I get an error. With Open offsite links in new window FF1+ IE5+ (http://www.dynamicdrive.com/dynamicindex8/newwindow2.htm) , I get text added to the site - most of which I can remove but am still left with an >. Any help with this would be greatly appreciated.

Twey
08-01-2005, 06:31 AM
The only line that references the checkbox in the former script is:

if (document.targetform.targetnew.checked)
You can remove this or edit it to use an alternative source. Make sure if removing it that you change
hyperlinks(true) to the value you want on startup (true for all links in new window, false for all links in same window).

As for the second one, the only HTML it should output is this:

if (!auto)
document.write('<form name="targetmain"><input type="checkbox" name="targetnew" checked onClick="dynamiclink()">Open off-site links in new window</form>')
You can stop this from happening by setting auto to 0 here:

//2)Automatically open offsite links in new window? (1=yes, 0 will render a checkbox for manual selection)
var auto=1
Oh, and the DD credit, of course.

bfboy
08-01-2005, 01:43 PM
Thanks Twey! :) I'll give it a shot later when I have more time. I really appreciate your help. :)