Forum Moderators: open
You actually just need to give the IFRAME a "name" attribute, and then put the name you give it into the target attribute of a link...
<iframe name='newsframe' width='300' height='400' src='about:blank'>
</iframe>
so this time an example link in your nav section would be:
<a href='news.html' target='newsframe'>News</a>
That's better :)
<iframe id='newsframe' width=100% name="iframe" height=100% frameborder="0" src="iframe.html"></iframe>
and for the link..the same as you
<a href='javascript:document.all.newsframe.src="info.html";'>News</a>
But when you click the link, it just opens the whole window and says "info.html"
Works:
<script type='text/javascript'>function Go()
{
document.all.foo.src="foo.html";
}</script>
<iframe id='foo' width='200' height='200'></iframe>
<a href='javascript:Go();'>Test</a>
Doesn't work: (does what you said above - very odd)
<iframe id='foo' width='200' height='200'></iframe><a href='javascript:document.all.foo.src="foo.html";'>Test</a>
Anybody?