Closed Thread Icon

Preserved Topic: A mouseover that loads an image at a different place (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=8933" title="Pages that link to Preserved Topic: A mouseover that loads an image at a different place (Page 1 of 1)" rel="nofollow" >Preserved Topic: A mouseover that loads an image at a different place <span class="small">(Page 1 of 1)</span>\

 
Milio
Bipolar (III) Inmate

From: belgium
Insane since: Nov 2003

posted posted 11-04-2003 03:18

If you google for javascripts on google you'll find a lot of them. But I can't seem to find a javascript that when you mouseover on it, loads an image at another place of your page.

Can anyone give me a good example of that?

bitdamaged
Maniac (V) Mad Scientist

From: 100101010011 <-- right about here
Insane since: Mar 2000

posted posted 11-04-2003 07:03

There's vitually no difference in code from changing the image you are rolling over and changing a different one.

All you need to do is name your images in the tags.

<img name="whatever" src="whatever.gif">


Then change the src of it
document.images.whatever.src = "whatever2.gif";

Now you just need to make that happen with a mouseover

<img name="something" src="something.gif" onMouseOver="document.images.whatever.src=whatever2.gif">



.:[ Never resist a perfect moment ]:.

outcydr
Paranoid (IV) Inmate

From: out there
Insane since: Oct 2001

posted posted 11-04-2003 07:18

is this what you mean?
http://www.javascriptkit.com/script/script2/rolldifferent.shtml

Petskull
Maniac (V) Mad Scientist

From: 127 Halcyon Road, Marenia, Atlantis
Insane since: Aug 2000

posted posted 11-04-2003 18:18

being a jet geek, I'd like to point out that the first pic is an F-117 and not a B-2...

*clears throat*
*looks around and sees that noone cares*
*leaves*


Code - CGI - links - DHTML - Javascript - Perl - programming - Magic - http://www.twistedport.com
ICQ: 67751342

trib
Paranoid (IV) Inmate

From: Den Haag, Netherlands
Insane since: Sep 2002

posted posted 11-04-2003 18:36

Load them into absolutely positioned, named divs. Position them one above the other and then just switch the visibility of the divs from hidden to visible with the onMouseover. That way, there's no loading delay 'coz they're all pre-loaded ...

as per http://www.trib-design.com/tribulation


Bug-free software only exisits in two places
A programmer's mind and a salesman's lips

[This message has been edited by trib (edited 11-04-2003).]

« BackwardsOnwards »

Show Forum Drop Down Menu