Click to See Complete Forum and Search --> : mouse over event


thomas1973
08-15-2003, 03:53 AM
I am designing an intranet and would like to link to parts of our internal network through iframes:

<iframe src="\\2000FILE1\INTRANET\HumanResources" frameborder="0"></iframe>

What I would like to be able to do is dynamically change the src of the iframe when I roll over text. I have done a similar thing for images an that works fine:

<div id="Layer1" style="position:absolute; left:152px; top:9px; width:141px; height:34; z-index:1"><img src="images/pholder.gif" name="ig1" width="141" height="34"></div>

<A HREF="http://search.yell.com/search/DoSearch" target="_blank"
onMouseover="ig1.src='images/yell2.jpg'">Yellow Pages</A>

but when i try to apply the same technique to the iframe src I get an error message. Is this possible or am I wasting my time?

xataku_nakusute
08-15-2003, 04:21 AM
you could try to trigger the function from within the iframe, like so:

<iframe name="intranet" src="vlah"></iframe>
<a href="blah" onmouseover="document.intranet.location.href='blah'">
Rollover Me!</a>

im not sure if thisll work for im not too familiar with iframes, however, i believe this may work due to similarities between frames, iframes, and popup windows. sorry though, i did not have enough time to test the code.

hope it helps or gets you on the right track at least

thomas1973
08-15-2003, 05:43 AM
That works very well - exactly what I was looking to do - thanks a lot xataku_nakusute :D

satire
08-24-2003, 12:54 AM
I need the HOME, GALLERIES, and SERVICES buttons to do the following:

onMouseOver = 1. Change image from gold to purple
2. load submenu in iframe named "SubMenu"

onMouseClick = Go to the appropriate URL (i.e. <a
href="http://www.ikkyudo.com"><img src="home.gif"></a>

onMouseOut = Change inage from purlpe back gold but the submenu should remain visible.

I used your ides to get the frame to display the submenus correctly but I need to get the image to change too.
Also, this does not seem to work in Netscape 7. IE is fine.

Any suggestions?
Thanks in advance.

http://www.ikkyudo.com/images/navigation_buttons/test/t10.htm:confused: