Hi all,
I am quite new to javascript so please excuse me if this is a beginners question.
I need to check an images src value against a constant value.
Here is what I do in words:
I fill an array with paths to different images.
When a user click on an image, it will be replaced by a randomly chosen elemnt form the array and a new image will be displayed.
But, when the user click on this image again, I would like to reset it to the original constant value.
When I do something like:
If (document
.src != "mypathandImage.lpg")
{document
.src = "mypathandImage.lpg";
}
then I get an object required and the whole thing stops.
Any help would be much appreciated.
TIA,
DaWeedz
Weedz (Edward W.F. Veld)
I am quite new to javascript so please excuse me if this is a beginners question.
I need to check an images src value against a constant value.
Here is what I do in words:
I fill an array with paths to different images.
When a user click on an image, it will be replaced by a randomly chosen elemnt form the array and a new image will be displayed.
But, when the user click on this image again, I would like to reset it to the original constant value.
When I do something like:
If (document
{document
}
then I get an object required and the whole thing stops.
Any help would be much appreciated.
TIA,
DaWeedz
Weedz (Edward W.F. Veld)