Hai,

I made a captcha verification in my php page and refresh the image using a simple javascript. Everything working fine in IE .. But in FF the refresh of image is not working... This is my code... Please advice

<script language="javascript">
function refreshCaptcha(){
document.getElementById('code').value='';
document.getElementById('captchaImage').src="captcha.php";
}
</script>

Thanks in advance
Rajeesh

Your image is being cached because it's the same URL. Add a random URL parameter to prevent it from being cached.

document.getElementById('captchaImage').src="captcha.php?_rnd=" + Math.random();
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.