ClientEvents-OnRequestStart and ClientEvents-OnResponseEnd not working

2 posts, 0 answers
  1. Manuel
    Manuel avatar
    7 posts
    Member since:
    Oct 2011

    Posted 21 Dec 2011 Link to this post

    hi

    ClientEvents-OnRequestStart and  ClientEvents-OnResponseEnd is not working if the controls that i am calling is inside the panel that is disabled and i cannot postback the page using my submit button

    For example

    ClientEvents-OnRequestStart="ClearNameMsg" ClientEvents-OnResponseEnd="RadManagerResponseEnd"
          function ClearNameMsg() {     
                      document.getElementById("<%=CustomDomainTxt.ClientID %>").disabled = true;
                      document.getElementById("<%=SubDomainTxt.ClientID %>").disabled = true;
                  }

             function RadManagerResponseEnd() {
                      document.getElementById("<%=CustomDomainTxt.ClientID %>").disabled = false;
                     document.getElementById("<%=SubDomainTxt.ClientID %>").disabled = false;
                  }

    one of the two textboxes are inside a panel that is disabled. when i click the button submit. I cannot proceed. when i commented out this
           document.getElementById("<%=CustomDomainTxt.ClientID %>").disabled = false;
                     document.getElementById("<%=SubDomainTxt.ClientID %>").disabled = false;
          document.getElementById("<%=CustomDomainTxt.ClientID %>").disabled = true;
                      document.getElementById("<%=SubDomainTxt.ClientID %>").disabled = true;

    Everything is working fine again. any help
  2. Andrey
    Admin
    Andrey avatar
    836 posts

    Posted 23 Dec 2011 Link to this post

    Hello Manuel,

    I tried to reproduce the issue but to no avail. I am attaching sample project based on your scenario to find the difference with your project.

    However, I think that you are disabling the panel control with the Visible=false property. And because of this the getElementByID function is returning null and the request is broken. This is true because when Visible property is set to false the control is not rendered on the page at all and because of that the element could not be found.


    Regards,
    Andrey
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
Back to Top