[jQuery] [validate] jQuery Validate AJAX Captcha
first problem: clicking to refresh CAPTCHA results in broken image.
http://jquery.bassistance.de/validate/demo/captcha/ <-- see demo
easy fix: in file image_req.php, change:
'img src="images/image.jpg?'
to
img src="images/image.php?'
upon doing this CAPTCHA works fine, and will refresh one time without
clearing the whole form. The second time you click it, everything in
the form disappears.
i tried changing
echo '<a href="index.php" onclick="refreshimg(); return false;"
title="Click to refresh image"><img src="images/image.php?' . time() .
'" width="132" height="46" alt="Captcha image" /></a>';
to
echo '<a href="index.php" id="refreshimg" title="Click to refresh
image"><img src="images/image.php?' . time() . '" width="132"
height="46" alt="Captcha image" /></a>';
which seemed to make more sense. with them both the same, i then just
made the CAPTCHA image an include.
the form behaved exactly the same no matter which way i tried. on
first CAPTCHA reset, image changes without disturbing the form
contents. on second, it resets the form entirely (without seeming to
reload the whole page).
example here: http://rksdesign.com/jquery-validate/index.php