Forum Moderators: open
<img src="logo1.gif" alt="Verification Number" align="absmiddle" id="thisImage" /><input name="button" type="button" onclick="document.getElementById('thisImage').src='logo2.gif';" value="New Code!" />
It works for me. The only difference is I'm actually trying it with images and not a php script. I can't help you with the php stuff, sorry.
Not sure why it gave me a problem. This is what I ended up using:
<img src="randomImage3.php" id='randImage2' alt="Verification Number" align="absmiddle" /> <input name="button" type="button" onclick="document.getElementById('randImage2').setAttribute('src', 'randomImage3.php?r='+ Math.floor(Math.random() * 5000));" value="New Code!" />