I'm new to Javascripting - infact, I'm not I just having done any for ages.
I'm trying to change and image once using a function at the end of a javascript countdown. In the countdown script it says I can specify a function to call on complete.
onComplete : changeImage,
So, at the bottom of the javascript countdown timer, I wrote this:
function changeImage(a) {document.getElementById("img").src=a.src;}
</script>
The image I want to change is above the script, written here:
<a href="index.php"><img id="img" align="middle" height="450" src="images/samandwill.gif" class="logo" /></a>
I want to change the image src to "images/samandwill2.gif"
How can I do this? - I'm using Dreamweaver and PHP.
This is probably totally simple, but I'd be very grateful for some help. All I can find is answers for onclick functions, which is not what I want.
I'd really appreciate some help!
Thanks!
Will