Gossamer Forum
Home : Products : Links 2.0 : Discussions :

How do I get links to open in a new window?

Quote Reply
How do I get links to open in a new window?
Does anyone know what I have to change to get a clicked link to open in a new browser window? Thanks!
Quote Reply
Re: How do I get links to open in a new window? In reply to
I was gonna ask the same thing, but since you already asked I will just clarify it so maybe we can get some help Smile

I have Links 2.0 installed and working, when they do a search the results come up within a frame on my site, but when people click on the links (results) the new page loads in the frame too. Is there a way to make the results stay within the frame, but when they click on a link (A result from a search) that the newsite they were looking for would open into a new window?
Quote Reply
Re: How do I get links to open in a new window? In reply to
I answered this question two days ago. I have also seen other people asking the same. I don't know if you did a search (this board is not good at returning search results).

Anyway, it's easy. Use target="_blank" forllowing the link, before closing the tag. You can do this either in the template or in site_html(template).pl
Quote Reply
Re: How do I get links to open in a new window? In reply to
Rick-

If you are using frames, you should modify ALL of your external links to include target="_top". This will make the link load in the full window and not your frame. This is instead of using target="_blank" which will open a whole new window.

You didn't mention if you are using templates or not, but if you are modify link.html as so:

Code:
<a class="link" href="<%db_cgi_url%>/jump.cgi?ID=<%ID%>" target="_top">

Also, note that the "random" link will have to be changed on each page.

[This message has been edited by Brad Richardson (edited March 04, 1999).]
Quote Reply
Re: How do I get links to open in a new window? In reply to
Thank you guys, Works like a charm... Keep an eye out for my next question.. Smile