1
ghia
Reuse of id in captcha
  • 2009/4/16 23:33

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


In the XOOPS captcha the id xoopscaptcha is given to two elements in the page: the image and the input.
<script type="text/javascript">
function 
xoops_captcha_refresh(imgId)
{
  
xoopsGetElementById(imgId).src 'http://site.com/class/captcha/image/scripts/image.php?refresh='+Math.random();
}
</
script>
<
img id="xoopscaptcha" src="http://site.com/class/captcha/image/scripts/image.php?refresh=0.4971660853506287" onclick="this.src='http://site.com/class/captcha/image/scripts/image.php?refresh='+Math.random()" style="cursor: pointer; vertical-align: middle;" alt="">
<
br>
<
a href="javascript: xoops_captcha_refresh('xoopscaptcha')">
Cliquez ici pour rafraîchir l'image si elle n'est pas suffisamment claire.
</
a>
<
br><br>
<
input name="xoopscaptcha" id="xoopscaptcha" size="4" maxlength="4" value="" type="text">
<
br>
Entrez les lettres de l'image<br>Le code est insensible à la casse<br>Maximum de tentatives, vous pouvez essayer : 10

Login

Who's Online

231 user(s) are online (152 user(s) are browsing Support Forums)


Members: 0


Guests: 231


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits