Click on the play audio link in the captcha will focus to the top of the form

2 posts, 0 answers
  1. Donny
    Donny avatar
    1 posts
    Member since:
    Dec 2010

    Posted 20 Apr 2011 Link to this post

    I am using RadCaptcha in a user control in an application form.  It contains many controls (ie textboxes, dropdownlists, and etc) that expanded the form from top to bottom result in a vertical scroll bar.  The RadCaptcha is placed at the bottom before the submit button.

    Functionality wise, the RadCaptcha is working as expect but everytime I click the link to play the audio, the form would automatically scrolls to the top instead of staying at the bottom.  In contract, the Generate New Image would stay where it is after a new image is generated.  Is this the normal behavor of the control?  How do I prevent it from focus to the top of the form when playing the audio?



    This is how I added the RadCaptcha to the usercontrol:


    protected void Page_Init(object sender, System.EventArgs e)
    captcha = new Telerik.Web.UI.RadCaptcha();
    captcha.ID = "captcha";
    captcha.ErrorMessage = "The security code you entered did not match. Please try again.";
    captcha.EnableRefreshImage = true;
    captcha.CaptchaAudioLinkButtonText = "Play Audio Code";
    captcha.CaptchaImage.EnableCaptchaAudio = true;
    captcha.CaptchaImage.AudioFilesPath = Server.MapPath("/forms/RadCaptcha");
    captcha.CaptchaImage.UseAudioFiles = true;
    captcha.CaptchaTextBoxLabel = String.Empty;
    captcha.Visible = true;





  2. Pero
    Pero avatar
    1156 posts

    Posted 22 Apr 2011 Link to this post

    Hello Donny,

    I created a sample project, based on the code you provided, to try to reproduce the issue locally on my machine, but with no success. Could you please test my code on your side and see if you experience any problems? I have attached it to the thread.
    In case you can reproduce the issue, please provide a sample project that shows the problem so we can debug it locally. Additionally we need the following information:
    • Version of RadControls for ASP.NET AJAX used
    • Browser and browser version used.

    the Telerik team

    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

  3. DevCraft R3 2016 release webinar banner
Back to Top