I am retrieving a captcha image from the Java based package "SimpleCaptcha"
On the front end I just put the following in my page and I get a captcha image:
<img src="stickyImg" />
I want to reload this captcha image onclick using javascript.
I tried:
$("#theclickhandler").click(function(){
$("#stickyImg").load('stickyImg', function(response){
$("#stickyImg").attr('src', response);
});
return false;
});
This gets the image but outputs something like this (greatly shortened obviously):
<img src="captcha image�PNG �ݚ��L�23U�݆�}$�J����Dy����IEND�B`� ">
That looks like raw, binary data to me. How do I get this to work?