This is a migrated thread and some comments may be shown as answers.

ClientEvents-OnRequestStart and ClientEvents-OnResponseEnd not working

1 Answer 101 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Manuel
Top achievements
Rank 1
Manuel asked on 22 Dec 2011, 03:39 AM
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

1 Answer, 1 is accepted

Sort by
0
Andrey
Telerik team
answered on 23 Dec 2011, 03:58 PM
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
Tags
Ajax
Asked by
Manuel
Top achievements
Rank 1
Answers by
Andrey
Telerik team
Share this question
or