howtothings.co.uk
Links in iframes, make them open in new tab? - Printable Version

+- howtothings.co.uk (https://www.howtothings.co.uk)
+-- Forum: Computing (https://www.howtothings.co.uk/forumdisplay.php?fid=4)
+--- Forum: Website Development, Implementation and General Webmaster Support (https://www.howtothings.co.uk/forumdisplay.php?fid=9)
+--- Thread: Links in iframes, make them open in new tab? (/showthread.php?tid=288)



Links in iframes, make them open in new tab? - Loka123 !p9TllnK6yg - 20-07-2010

So I have this iframe that shows the new images uploaded on my imgboard and when you click on the image you get to the thread started with that image, now when I do this when people click on the images the threads open in the iframe...

Is there anyway I can make so that when any link gets clicked the content opens in a new tab?


RE: Links in iframes, make them open in new tab? - Mark - 20-07-2010

I think this'll do the job.

In your frame, the one with the images in eg.

[code=html]
<frame src="up_images.html">
[/code]

I'm not sure how your setup is but adding title="blank" to the image should do the trick.

[code=html]
<a href="http://google.co.uk" title="title" alt="alt" target="blank"><img src="pic.png" /> </a>
[/code]


RE: Links in iframes, make them open in new tab? - Loka123 !p9TllnK6yg - 20-07-2010

(20-07-2010, 12:01 PM)Mark Wrote: I think this'll do the job.

In your frame, the one with the images in eg.

[code=html]
<frame src="up_images.html">
[/code]

I'm not sure how your setup is but adding title="blank" to the image should do the trick.

[code=html]
<a href="http://google.co.uk" title="title" alt="alt" target="blank"><img src="pic.png" /> </a>
[/code]

Ye, but the links are randomly generated so I can't do that, but whatever I just edited my "generate" code, this thread can be closed now.