<td runat="server" style="padding-bottom:15px; width:40px;">
<asp:Panel ID="pnlHolder" runat="server" Visible="true" ></asp:Panel>
<telerik:RadAjaxLoadingPanel id="LoadingPanel1" runat="server" Width="30px"
Height="30px" IsSticky="false" >
<asp:Image id="Image2" runat="server" ImageUrl="~/Image/ajax-loader.gif" />
</telerik:RadAjaxLoadingPanel>
</td>
I have a click event that fires a javascript as followed based on a click event:
<
script type="text/javascript" language="javascript">
var currentLoadingPanel = null;
var currentUpdatedControl = null;
function AjaxRequestStart() {
if (document.getElementById("<%= hdnAvailabilityChecker.ClientID %>").value == 1) {
return;
}
if (document.getElementById("<%= TextBox7.ClientID %>").value == "") {
return;
}
document.getElementById(
"<%= TextBox7.ClientID %>").value = document.getElementById("<%= TextBox7.ClientID %>").value.toUpperCase();
currentLoadingPanel = $find(
"<%= LoadingPanel1.ClientID %>");
currentUpdatedControl =
"<%=pnlHolder.ClientID %>";
currentLoadingPanel.show(currentUpdatedControl);
var t = setTimeout("AjaxResponseEnd()", 2000);
}
function AjaxResponseEnd() {
if (currentLoadingPanel != null) {
currentLoadingPanel.hide(currentUpdatedControl);
document.getElementById(
"<%= hdnAvailabilityChecker.ClientID %>").value = 1;
}
}
The script works fine when we click the button for the first time. But on the second click it throws the following message:
Microsoft JScript runtime error: Sys.InvalidOperationException: Could not find UpdatePanel with ID 'ctl00_ctl00_MainContent_pnlHolderPanel'. If it is being updated dynamically then it must be inside another UpdatePanel.
Any help on this will be appreciated. Thanks.