Gossamer Forum
Home : Products : Links 2.0 : Customization :

How can I make a clicked link open a new window?

Quote Reply
How can I make a clicked link open a new window?
Hi everybody!
How can I make a link open in a new window?
I tried to modify the jump.cgi and added a target=_blank but the link still opened in the same window. The only think was that the url of the clicked page showed up as http://whatever.com target=_blank in my browser.
Does anybody know how to fix this?

Thanks in advance!
Joe
Quote Reply
Re: How can I make a clicked link open a new window? In reply to
Shouldn't you be using target="_blank" instead .... with the quotes? I'm not familiar with programming, but in html coding you should include the quotes.

I also found this thread which may be more helpful.
http://www.gossamer-threads.com/...um3/HTML/000659.html

[This message has been edited by lunaria (edited February 17, 1999).]
Quote Reply
Re: How can I make a clicked link open a new window? In reply to
Hey, here it is:

<a href="http://SomeURL.com" target="_new">SomeURL.com</a>

But if you add this to a CGI script...

<a href=\"http://SomeURL.com\" target=\"_new\">SomeURL.com</a>

This will popop a new window with 'SomeURL.com'.

Regards,

Pasha

------------------
-[ It's just another night; good morning Webmasters! ]-
Quote Reply
Re: How can I make a clicked link open a new window? In reply to
 
Code:
##########################################################
## A Link ##
##########################################################

sub site_html_link {
# --------------------------------------------------------
# This routine is used to display what a link should look
# like. It's a little complex looking just because we have to
# check for blank entries..

my (%rec) = @_;

$build_detailed ?
($output = qq~<ul><li><a class="link" href="$build_detail_url/$rec{$db_key}$build_extension">$rec{'Title'}</a>~) :
($output = qq~<ul><li><a class="link" href="$build_jump_url?$db_key=$rec{$db_key}" target="blank">$rec{'Title'}</a>~);

if ($rec{'Description'}) { $output .= qq~ <span class="descript"><br><font face="arial" size="2">$rec{'Description'}</font></span>\n~; }
if ($rec{'isNew'} eq "Yes") { $output .= qq~ <small><sup class="new">new</sup></small>~; }
if ($rec{'isPopular'} eq "Yes") { $output .= qq~ <small><sup class="pop">pop</sup></small>~; }

$output .= qq~ <font size="1">(Added: $rec{'Date'} Hits: $rec{'Hits'} Rating: $rec{'Rating'} Votes: $rec{'Votes'}) <a href="$build_rate_url?ID=$rec{'ID'}">Rate It</a></font>
</ul>
~;

return $output;
}

Regards,
Brian