Project:Iframe
Version:6.x-1.3
Component:User interface
Category:support request
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

Thanks for this plug in. I'd like to use this within a panel or similar, and set the target of the iframe field to be in another pane, next to the pane the node with iFrame link is in. What's the best way to do this?

Comments

#1

anyone?? Is this a noob question?

#2

The target attribute is set on links and the links are found within the iframed content. Therefor you need to manipulate the source and add target to the links there.

Failing that, perhaps something could be done in the lines of my recent patch in #360549: Auto-Detect iframe height based on target url height. I added a simple proxy script which could be rewritten to modify the links in the source document and set a target attribute to them.

#3

Status:active» closed (fixed)

Tobias is right. You have to mention the target in your source-code inside the iframe (a href="meinlink/hier.php" target="TARGETNAME")

The proxy-script from i would NOT use, because this is an open-proxy-relay (case for RIAA)

#4

Hi I have the same problem.
Showing an external page in Iframes, which is one of the main reasons to use Iframes in the first place.
So, obviously, "manipulate the source" is completely out of the question.

And unfortunately there is an error in the mentioned options:

-div class="field_myiframe"-
-iframe src="[URL]" width="[width]" height="[height]" target="[target_value]"- URL -/iframe-
-/div-

because the -iFrame- tag does not accept "target" as an attribute. target="-target_value-" simplyl doens't exist!
This is in fact the fundamental problem of the -iFrame- tag. It seems the guys who invented it just didn't think very user/designer friendly.

Searching on the internet I have seen some vague references to workarounds through javascript, but not one copy and paste worthy code for trying out, except:

onload = function() {
var frame = parent.frames[0].document;
var links = frame.getElementsByTagName('a');
for (var i=0; i

which doesn't work though.

So using Iframes to show, for example, an external listing with links that you want to open in a new window simply seems to be impossible and must be done another way. But I haven't found this other way either... :(