I am trying to show/hide a RadAjaxLoadingPanel explicitly. I am using a RadAjaxPanel (want to try avoiding having to change my page to use a RadAjaxManager instead). I have set the ClientEvents-OnRequestStart="RequestStart" ClientEvents-OnResponseEnd="ResponseEnd" for my RadAjaxPanel.
<
telerik:RadCodeBlock
ID
=
"RadCodeBlock"
runat
=
"server"
>
<
script
type
=
"text/javascript"
>
var currentLoadingPanel = null;
var currentUpdatedControl = null;
function RequestStart(sender, args) {
currentLoadingPanel = $find("<%= RadLoadingPanel1.ClientID %>");
if (args.get_eventTarget() == "<%= btnGo.UniqueID %>") {
currentUpdatedControl = "<%= RadAjaxPanel1.ClientID %>";
}
//show the loading panel over the updated control
currentLoadingPanel.show(currentUpdatedControl);
}
function ResponseEnd() {
//hide the loading panel and clean up the global variables
if (currentLoadingPanel != null)
currentLoadingPanel.hide(currentUpdatedControl);
currentUpdatedControl = null;
currentLoadingPanel = null;
}
</
script
>
</
telerik:RadCodeBlock
>
ResponseStart() and ResponseEnd() are called properly, but the loading panel does not hide when currentLoadingPanel.hide(currentUpdatedControl) is called. The loading panel just stays there forever. This is what my loading panel looks like.
<
telerik:RadAjaxLoadingPanel
ID
=
"RadLoadingPanel1"
runat
=
"server"
>
</
telerik:RadAjaxLoadingPanel
>