On Jul 13, 11:10 am, Benjamin Sattler <
[email protected]>
wrote:
Hi!
Well, I tried it myself and it seems to work perfectly for me. Post
your code, maybe there's an error in it?
byebye
First post btw
Hi,
On my page i have 2 iframes. If a link is clicked in iframe2, i
want it to load the referenced page in iframe1. I tried
target=iframe1 and that does not seem to be working. Is there a
way to do this or does this only work from the parent page?
Thanks.
Here is the code to create the iframes:
<center><table cellspacing="0" cellpadding="0"
border="0"><tbody><tr><td>
<iframe id="videoFrame" marginwidth="0" marginheight="0"
src="videos.html" frameborder="0" width="221" scrolling="no"
height="206"></iframe>
</td></tr>
<tr><td>
<iframe id="videoListFrame" marginwidth="0" marginheight="0"
src="videoList.html" frameborder="0" width="221" scrolling="auto"
height="250"></iframe>
</td></tr></tbody></table></center>
And here is the code for the link.
output += '<a href="videos.html?file='
+ xmlDoc.getElementsByTagName('fileName')
.childNodes[0].nodeValue
+ '" target = "videoFrame"><font face = "verdana" size = "2" color
= "#FFFFFF">'
+ xmlDoc.getElementsByTagName('title').childNodes[0].nodeValue
+ '</a><br>\n<hr>\n';
}
document.getElementById('vids').innerHTML = output;
}
the links are created in a loop that takes filenames from an XML file.
Thanks for any insight. The link opens the file in a new window
everytime....- Hide quoted text -
- Show quoted text -
I'd advise against using IFrame's for this as you don't need them and
they are more trouble than they are worth. In answer to your
question, you need name attributes on any frames you wish to target.