Home > Technical & Creative Skills > Programming, Servers & Scripts

How to open iframe link in the same window/tab? (3)


05-13-2015 10:22 PM #1 Philwil (Member)
How to open iframe link in the same window/tab?

I tried searching for answers in google but they didn't work for me. I have iframed a custom page on my lander, and want the links in the iframe to open in the parent window and not within the iframe itself.

This is the script of the iframed page with the url link:

<script type="text/javascript">
var offer = 'http://www.trackinglink.com'
</script>

Tried different methods but no luck, I added for example target="_parent".


05-13-2015 11:17 PM #2 ninjaspeed (Member)

Philwil, where is the target="_parent" located at? Inside an <a> or <base> tag?

Or you can use: window.top.location = "http://www.trackinglink.com"; in javascript.


05-14-2015 11:15 AM #3 Philwil (Member)

I put this in the header <base target="_parent" />, but doesnt help

EDIT:solved by using window.top.location and target="_parent" in the js file


Home > Technical & Creative Skills > Programming, Servers & Scripts