Click to See Complete Forum and Search --> : HELP: Image Swap


his boy elroy
09-07-2003, 05:56 PM
I am a designer and I am working on my online portfolio. This what I would like to do:

I have a page with one main image and 6 thumbnail images at the bottom. When I click or mouseover a thumbnail image I would like the larger image to swapout for the thumbnail I am mousing over. I tried using the image swap behavior in Dreamweaver MX but I could not achieve the desired result. Is there a JavaScript that a novice like myself can use?

I have uploaded the page to my server:

http://edesedoret.com/test/main_ren_grand-lounge.html

Thanks

Also I would like all of the images to preload :)

MadCommando
09-07-2003, 07:08 PM
I know someone will probably correct me, but I think a javascript can preload by using the command

theimagename=new Image()
theimagename.src="insert source here"

and you could use a function to change image source. I think this requires the image be in a form

ex:
<form name="myimage">
<img name="actualimage" onMouseOver="thefunctiontochangesource1()" onMouseOut="fnctn src="defaultsource">
</form>


and your function could be something like this
function thefunctiontochangesource1()
{
myimage.actualimage.src="thesourceforaltpic1"
}

and you can get the idea from there.

his boy elroy
09-07-2003, 07:42 PM
Thanks, I couldn't get it to work, I am new to Javascript.

his boy elroy
09-08-2003, 07:01 AM
The following is a link to the page in question:

http://edesedoret.com/test/main_ren_grand-lounge.html

Fang
09-08-2003, 07:37 AM
I just did a basic image swap here (http://forums.webdeveloper.com/showthread.php?s=&postid=89053#post89053)