Gossamer Forum
Home : Products : Links 2.0 : Customization :

make a clicked link open in new window

Quote Reply
make a clicked link open in new window
Anybody know how i can get a clicked link on a page open in a new browser window. I am using this in a frame and don't want people stuck in my frames when they click on a link to goto another site.. Any help would be greatly appreciated.
Thanks,
John
Quote Reply
Re: make a clicked link open in new window In reply to
In your jump.cgi find and change this line
# Now let's send the user to the url..
$goto ?
print "Location: $goto\n\n" :---->this is the line to change
&error ("Record not found ($in{$db_key})");
to
# Now let's send the user to the url..
$goto ?
print "Location: $goto target=New\n\n" :
&error ("Record not found ($in{$db_key})");
Hope this helps
Joey

[This message has been edited by Joey Bost (edited December 24, 1998).]
Quote Reply
Re: make a clicked link open in new window In reply to
Thanks for the info I got it to work. Thanks for the help
see ya,
John

[This message has been edited by john hoskins (edited December 24, 1998).]
Quote Reply
Re: make a clicked link open in new window In reply to
In your jump.cgi find and change this line
# Now let's send the user to the url..
$goto ?
print "Location: $goto\n\n" :---->this is the line to change
&error ("Record not found ($in{$db_key})");
to
# Now let's send the user to the url..
$goto ?
print "Location: $goto target=_blank\n\n" :
&error ("Record not found ($in{$db_key})");

------------------
[]'s

Lucas Saud

Quote Reply
Re: make a clicked link open in new window In reply to
Would that change all the links on a page ?
if yes
How can i specify only one or 2 of the links to open anew window ?

------------------
www.organizedchaos.net
Quote Reply
Re: make a clicked link open in new window In reply to
Specifying only a few links to open in a new window would probably be hard. You would have to add a new field to your links.db file, and modify the subroutine in site_html.pl that prints links to add target="_new" to the <a> tag if the new field in your database for that link had a value of Yes.
Quote Reply
Re: make a clicked link open in new window In reply to
Specifying only a few links to open in a new window would probably be hard. You would have to add a new field to your links.db file, and modify the subroutine in site_html.pl that prints links to add target="_new" to the <a> tag if the new field in your database for that link had a value of Yes.