Notifications
Clear all

Open all generated links in an iframe to open in a new window or tab

11 Posts
2 Users
0 Reactions
1,803 Views
Posts: 5
Topic starter
(@gphenders)
Active Member
Joined: 2 years ago

So I'm considering buying iframe pro but I need to know if it will do something first.

So I've been given an embed code to display a leader board on my website but if I click on any of the links in the iframe I get a connection refused.

So I need a way that when you click on any of the links they open in a new window or tab.

I've looked everywhere and can't see to find a solution as I don't have control of the domain the links are generated from and some have suggested that iframe pro may be able to do this.

The code I was given was this.

<iframe src="https://theurl" width="100%" height="500" frameborder="0" scrolling="auto" allowtransparency="true"></iframe>

This then generates links inside the iframe which are clickable but it seems to try and open them inside the iframe window but I get a connection refused error but if I right-click on the link to open in a new window or tab they work.

Please note have very little coding understanding and just starting out.

Thanks

10 Replies
TinyWebGallery
Posts: 925
Admin
(@admin)
Prominent Member
Joined: 16 years ago

The pro version can change link targets only IF you are able to include a Javascript file into the page that is in the iframe. 

See: https://www.tinywebgallery.com/blog/advanced-iframe/advanced-iframe-pro-demo/change-links-targets#e11

As you wrote you cannot control the other page you cannot use this. 

So the only thing you can do it to ask the owner of the other page to set the link targets to _blank.

Best regards,

Michael

Reply
Posts: 5
Topic starter
(@gphenders)
Active Member
Joined: 2 years ago

Ok thanks for the reply, seems strange they would provide an iframe code that they know will produce links but not allow the links to be used.

I'll see what their support says.

Reply
TinyWebGallery
Posts: 925
Admin
(@admin)
Prominent Member
Joined: 16 years ago

Please ask them. Can you share a link? Because actually it should be checked why there is a connection refused error. In the browser console are normally more details about the error.

Best regards, Michael

Reply
Posts: 5
Topic starter
(@gphenders)
Active Member
Joined: 2 years ago

Well here is the actual iframe code they provide perhaps you can check as I said I don't know that much. Thanks

You will see if you click on any of the links that is where it fails

<iframe src="https://tennisfriends.challonge.com/brackettest01/predictions/module" width="100%" height="500" frameborder="0" scrolling="auto" allowtransparency="true"></iframe>
Reply
Page 1 / 3