I do have a custom php script that validates captcha code and sends an email. If php script is sending a mail successfully then it returns "true". This is done by:
if(!$Error){
echo "true";
exit;
}
Before returning true, I would like to execute a jQuery command that should refresh the captcha image. I shouldn't be doing this is client side as it might be risky from spammers point of view.
To refresh the captcha image, The command is:
jQuery('#captcha').attr('src', ('php/captcha/captchaimage_show.php?' + Math.random()));
I need to call this command from within php scripts before return any results by "echo"
Prashant