where test.php generates an image with a random number.
Itried :
$(\'#verifyimage\').click(f
Taking KPrimes great answer and adding in trackers suggestion, this is what I came up with:
jQuery(function($) {
// we have both a image and a refresh image, used for captcha
$('#refresh,#captcha_img').click(function() {
src = $('#captcha_img').attr('src');
// check for existing ? and remove if found
queryPos = src.indexOf('?');
if(queryPos != -1) {
src = src.substring(0, queryPos);
}
$('#captcha_img').attr('src', src + '?' + Math.random());
return false;
});
});