SitePoint Sponsor

User Tag List

Results 1 to 5 of 5

Thread: Reload CAPTCHA

  1. #1
    SitePoint Guru TacMaf's Avatar
    Join Date
    Dec 2005
    Location
    Manchester, United Kingdom
    Posts
    663
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Reload CAPTCHA

    Hi, I have a captcha script and sometimes the image is unreadable.
    How can I use javascript to reload the <td></td> without reloading the entire page?

    Thanks.

  2. #2
    .* draziW tnioPetiS *. bronze trophy
    Join Date
    Jun 2004
    Location
    "Then I figure the most good good guy will win."
    Posts
    1,666
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi,

    Maybe an XMLHTTP request?

    Good luck!

    Cheers,
    M

  3. #3
    SitePoint Guru TacMaf's Avatar
    Join Date
    Dec 2005
    Location
    Manchester, United Kingdom
    Posts
    663
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks. Is there anything a little more simple? I can make <td> hide and show, is there anything that can just refresh it?

  4. #4
    SitePoint Guru DeNasio's Avatar
    Join Date
    May 2001
    Posts
    830
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by TacMaf View Post
    Thanks. Is there anything a little more simple? I can make <td> hide and show, is there anything that can just refresh it?
    Code:
    <img src="captcha.php" id="captcha">
    <input type="text" name="captcha_code">
    [ <a href="#" onclick="document.getElementById('captcha').src = document.getElementById('captcha').src + '?' + (new Date()).getMilliseconds()">Refresh Image</a> ]
    captcha displays the captcha image
    Ballot-Box.net - free polls for webmasters
    FormLog.com - free form processor

  5. #5
    SitePoint Guru TacMaf's Avatar
    Join Date
    Dec 2005
    Location
    Manchester, United Kingdom
    Posts
    663
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks. I figured out ajax and its gr8 now. Cheers.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •