Hi. Is it possible onclick event the image blue_go.jpg to be swaped with another one. Thanks

1. <!-- <input type="image" title="Click here to start Uploading" src="<?=$host;?>/images/blue_go.jpg" id="free_go_btn" alt="Go"/>
2. <!-- <input type="image" src="<?=$host;?>/images/blue_go.jpg" id="free_go_btn"  onclick="beginUpload('<?=$sid;?>'); return false;" alt="Go"/>

Hi. Is it possible onclick event the image blue_go.jpg to be swaped with another one. Thanks

1. <!-- <input type="image" title="Click here to start Uploading" src="<?=$host;?>/images/blue_go.jpg" id="free_go_btn" alt="Go"/>
2. <!-- <input type="image" src="<?=$host;?>/images/blue_go.jpg" id="free_go_btn"  onclick="beginUpload('<?=$sid;?>'); return false;" alt="Go"/>
<script type="text/javascript" language="javascript">
function swap_img(var sr)
{
	document.getElementByID('free_go_btn').src = sr;
}
</script>
<input type="image" title="Click here to start Uploading" src="<?=$host;?>/images/blue_go.jpg" id="free_go_btn" alt="Go"/>
<input type="image" src="<?=$host;?>/images/blue_go.jpg" id="free_go_btn"  onclick="beginUpload('<?=$sid;?>'); swap_img("<?=$host?>/new_img.jpg"); return false;" alt="Go"/>
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.