Reputation: 9585
Hi Calling my image code refresh using following code
Here "captchaController.do" is the springController.
<img name="captchaImage" id="captchaImage" src="captchaController.do" width="150px" height="30px"> <A href="#" class="standardLink" name="refreshImage" id="refreshImage" onClick="javascript:refreshImageCode();">Refresh</A>
/* This is used to refresh the image code*/
function refreshImageCode(){
$("#captchaImage").attr("src", "captchaController.do");
}
its working fine IE6 but problem in IE 8. Nothing is going happen. Image is not displayed
Please help
Upvotes: 1
Views: 145
Reputation: 66191
IE8 is probably caching your image (or not trying to reload since the name is the same). Try this:
function refreshImageCode(){
$("#captchaImage").attr("src", "captchaController.do?" + (Math.random() * 1000));
}
Upvotes: 1