You can find an exact example of that here. Change the event for the image to onClick, get it to call a function to refresh the source for the image to the same file it is initially set to. Should work.FredClausen said:I think if you look at code examples for onmouseover events for swapping images and change onmouseover to onclick, it will work for you.
What are you trying to achieve with the random number? You will get returned "2.jpg?0.678864716868319" or similar for the source of the image, so it clearly won't load.joecool85 said:function reloadImage()
img = document.getElementById('theimage');
img.src = '2.jpg?' + Math.random();