I'm trying to create a website where, when you hover a link (onmouseover) then a different content is shown in an IFRAME? e.g.
...
...
...
<a href="#" class="dark" onmouseover="mouseover('front.htm');" onmouseout="mouseout('default.htm');">About Us</a>
...
...
...
<div>
<script type="text/javascript">
function mouseover(txt)
{
document.write('<iframe src ="' + txt +'" width="100%" height="500" scrolling="no" frameborder="0"></iframe>');
but all this does is read in the IFRAME on the entire page and not as intended only in the <div> section... I'm not an experienced web programmer, I'm a newbie.... Hope you can help me
This solves the problem :-)
add the attribute name, and id to the <iframe> tag, and via the document.getElementById("frames"); I am able to set the <iframe src="someurl" > by tmp.src = txt; (see the function)
Bookmarks