View Single Post
Old 06-05-2009, 05:03 PM   #2 (permalink)
jamiemac2005
Design Team Member
 
jamiemac2005's Avatar
 
Join Date: Jul 2007
Location: Coventry, UK
Posts: 1,887
OS: Vista, various linux distros


Re: java script help

Hey, you need to make sure the image has an ID:

Code:
<img src="initialImage.jpg" id="theImage" />
Then at the top of the script you should then add the line:
Code:
var theImage = document.getElementById("theImage");
to reference the image.

Then where the document.write code is you should change it to:
Code:
theImage.src="will.jpg";
which will change the source attribute of the image (changing the image).

Cheers,
Jamey
__________________

Myspace
jamiemac2005 is offline   Reply With Quote