Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Dipa 88 posts 370 karma points
    Mar 02, 2016 @ 08:27
    Dipa
    0

    Captcha reload button

    Hello,

    I have successfully added the 'uCaptcha' package for captcha.

    Now I want a reload(refresh) button, which reloads only captcha image. How Can I do that?

    Please guide me for it. I am trying but not getting success.

    Thanks, Dipa

  • Alex Skrypnyk 6132 posts 23951 karma points MVP 7x admin c-trib
    Mar 03, 2016 @ 11:49
    Alex Skrypnyk
    0

    Hi Dipa,

    I'm afraid you can't do that in easy way. Maybe it will be easier for you to install reCaptcha ?

    https://www.google.com/recaptcha/intro/index.html

    It's just js and postback checking thing.

    Thanks, Alex

  • Dipa 88 posts 370 karma points
    Mar 03, 2016 @ 12:41
    Dipa
    100

    Hello,

    I got the solution for this issue by myself only. Below is the solution :

    <script type="text/javascript">
        $(document).ready(function () {
            $("#refreshImage").click(function () {
                $("#ImgCaptcha").attr("src", 'uCaptcha.ashx');
            });
        });
    </script>
    <body>
    //Refresh button
    <input type="button" style="background-image:url('../media/1177/refresh-icon.png'); title="Can't read? Try different words."  id="refreshImage" >
    //Captcha image
    <img src="~/uCaptcha.ashx" class="captchaImage" id="ImgCaptcha" />
    </body>
    

    Thanks.

  • Alex Skrypnyk 6132 posts 23951 karma points MVP 7x admin c-trib
    Mar 03, 2016 @ 12:46
    Alex Skrypnyk
    1

    Great Dipa, thanks.

Please Sign in or register to post replies

Write your reply to:

Draft