Jump to content

Redirected onmouseover event


Ajona

Recommended Posts

Greets, w3 forums. I'm trying to create a navigation meny for my site that will load an image when I move the pointer over one of the navigation link images, but not in place of the link image itself, but somewhere else on the page. And I'm thinking this could be done with the onmouseover script, but I am not quite sure how to.If possible, I'd like to avoid an iframe, and just load the object (information for the link which the mouse pointer just moved over) as an image directly unto the page.Any suggestion?

Link to comment
Share on other sites

Something like this?

<body><a href="#" onmouseover="main.src='http://www.google.co.uk/intl/en_uk/images/logo.gif'" onmouseout="main.src='http://www.atd.ucar.edu/rsf/IMPROVE/SPOL/widgets/blank.gif'">Google</a><br /><a href="#" onmouseover="main.src='http://pics.ebaystatic.com/aw/pics/uk/logos/logoEbay_150x70.gif'" onmouseout="main.src='http://www.atd.ucar.edu/rsf/IMPROVE/SPOL/widgets/blank.gif'">Ebay</a><br /><a href="#" onmouseover="main.src='http://us.i1.yimg.com/us.yimg.com/i/ww/beta/y3.gif'" onmouseout="main.src='http://www.atd.ucar.edu/rsf/IMPROVE/SPOL/widgets/blank.gif'">Yahoo</a><img style="height:150px;width:100px;position:absolute;left:500px; top:100px" id="main" src="http://www.atd.ucar.edu/rsf/IMPROVE/SPOL/widgets/blank.gif" /></body>

Link to comment
Share on other sites

  • 3 weeks later...
Something like this?
<body><a href="#" onmouseover="main.src='http://www.google.co.uk/intl/en_uk/images/logo.gif'" onmouseout="main.src='http://www.atd.ucar.edu/rsf/IMPROVE/SPOL/widgets/blank.gif'">Google</a><br /><a href="#" onmouseover="main.src='http://pics.ebaystatic.com/aw/pics/uk/logos/logoEbay_150x70.gif'" onmouseout="main.src='http://www.atd.ucar.edu/rsf/IMPROVE/SPOL/widgets/blank.gif'">Ebay</a><br /><a href="#" onmouseover="main.src='http://us.i1.yimg.com/us.yimg.com/i/ww/beta/y3.gif'" onmouseout="main.src='http://www.atd.ucar.edu/rsf/IMPROVE/SPOL/widgets/blank.gif'">Yahoo</a><img style="height:150px;width:100px;position:absolute;left:500px; top:100px" id="main" src="http://www.atd.ucar.edu/rsf/IMPROVE/SPOL/widgets/blank.gif" /></body>

Exactly and absolutely just like that. My thanks.And yah, most probably exceedingly easy and much more attractive when done in flash. But I'm teaching myself css and html now. Flash is advanced class ;-)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...