Click to See Complete Forum and Search --> : some onmouseover help!


HTMLmaniac
04-20-2003, 11:53 AM
i've seen it on many web pages, though i'd love to give an example, i can't remember any of them, lol, how they have one button or image and if your put the mouse button over it, you see a different image appear within another frame or basically in a different location. how exactly do you do that? and i would also like to know if you put your mouse over different buttons or images, if its possible to have different images appear in the same frame i was talking about.

khalidali63
04-20-2003, 12:02 PM
try this link,I hope this helps

http://68.145.35.86/skills/javascripts/DisplayTwoImagesClickOver.html

HTMLmaniac
04-20-2003, 12:35 PM
check out this link...it should show u what im trying to do :)

http://www.geocities.com/rockluv3r/likethis.htm

khalidali63
04-20-2003, 01:21 PM
yes its petty straight forward,fowllow the code in the example I posted above,look at the code section where images are changed by mouseover and hidden with mouseout events.
loggical flow of events.

1. create image objects on page load( or as its known as pre-load images)

2. When onmouseover is triggered
replace the image in the middle part of your page using kinda like this code,

the image tag in the middle of the page should have an id attribute say
<img id="centerImg" src="blank.gif">

in the event processing fro mouseover do something like this

var imgObj = document.getElementById("centerImg")
now change the src of the img
imgObj.src = imgArray[x].src;

where imgArray will be the array that has all the preloaded images in it.

hope this guides you ...

HTMLmaniac
04-20-2003, 09:44 PM
im currently working on this thing in dreamweaver and im having trouble figuring out how to do mouseovers on multiple images and have them load different pictures each time in the same place...like i showed you..i don't know how to type the code like that..and im really sorry for being so stupid in doin this i just have a hard time with java scripting..please help me out with the code! thank you so much!

pyro
04-20-2003, 10:14 PM
If you look at the code I wrote up for a site I'm making, it may help you out. The address is http://www.lakewoodconstruction.net/newsite I use text, but it could easily be replaced with images....

HTMLmaniac
04-20-2003, 11:24 PM
ok im doing something WAYYYYY wrong...check out my thing and tell me what im doing wrong...or just edit it for me and send me the reparations..whichever u want..lol

http://www.geocities.com/rockluv3r/ok.htm

just view the source code....but you probably already knew that..lol