Posts: 487
Name: Mark Stegeman
Location: Netherlands, Europe
|
As I said, if you had read closely, the code I provided wasn't working code.
I simply made a simple example to show you how it should look like.
You should store the locations of the images in your javascript, maybe as an array.
Then make the change function get the current image, and make it be the other.
Code:
function change1(picName)
{
if (document.images)
{
if(document[picName].src == images[0]){
document[picName].src = images[1];
}else{
document[picName].src = images[0];
}
}
What you need to do to make this code work is store the locations for the image in the array images.
__________________
<?php ($helpfull>0)?$talkupation++ : '';?>
|