Captcha refreshing in PHP form -


i'm trying use securimage php script (cf google) captcha's have problem: when press link "different image" (to display captcha), lose text entered in fields of php form. user have re-enter again, problematic.

here code. note: took away '#' href because reason, fails in changing captcha image. know why? (this happens in both safari , firefox)

<img id='captcha' src='/myproject/securimage/securimage_show.php' alt='captcha image' /><br> <a href='' onclick='document.getelementbyid('captcha').src =  '/securimage/securimage_show.php?' + math.random(); return false'> [different image ]</a> 

because have removed '#' href thats why whole page refreshed when link clicked , fields data lost. don't remove it, , use following code

<img id='captcha' src='/myproject/securimage/securimage_show.php' alt='captcha image' /> <br>  <a href="#" onclick="document.getelementbyid('captcha').src =  '/securimage/securimage_show.php?' + math.random(); return false;"> [different image ]</a> 

Comments

Popular posts from this blog

django - How can I change user group without delete record -

java - Need to add SOAP security token -

java - EclipseLink JPA Object is not a known entity type -