My problem is that I never see the Loading Panel, when I fire an ajax request with javascript code. What am I doing wrong?
SCENARIO:
- I have an aspx page with an ajax manager, loading panel, and a bunch of ascx controls.
- My loading panel displays when a control in the page fires an ajax event.
- However my problem is that my loading panel does NOT display when my client side javascript fires the ajaxrequest method of the ajax manager.
- I generally add the ajaxsettings to my controls in Page_Load, and I have used this line in order to try to get it to display:
UCCIndexingRadAjaxManager.AjaxSettings.AddAjaxSetting(UCCIndexingRadAjaxManager, this.ucUCCIndexingFilingControlsParent.ucFilingDetails, this.UCCRadAjaxLoadingPanel);
- ucFilingDetails is a publically exposed user control, within another user control on this aspx page. And UCCIndexingRadAjaxManager and UCCRadAjaxLoadingPanel are the ID's of my ajax manager and loading panel respectively.
- So by doing this, I am of course ajaxifying the ajax manager itself...
- Below are the declarations of my ajax manager and loading panel. In this case, you can see that I also have ajaxified the ajaxmanager and specified a loading panel, but I do NOT do it both that way and with the code behind like I showed you above, at the same time. I only tried doing it this way after commenting out my code-behind above.:
<telerik:RadAjaxLoadingPanel ID="UCCRadAjaxLoadingPanel" runat="server" Height="75px" Width="75px" Transparency="50" MinDisplayTime="500">
<img alt="Loading..." src='<%= RadAjaxLoadingPanel.GetWebResourceUrl(Page, "Telerik.Web.UI.Skins.Default.Ajax.loading.gif") %>' style="border:0;" />
</telerik:RadAjaxLoadingPanel>
<telerik:RadAjaxManager runat="server" ID="UCCIndexingRadAjaxManager" OnAjaxRequest="UCCIndexingRadAjaxManager_AjaxRequest">
<AjaxSettings>
<telerik:AjaxSetting AjaxControlID="UCCIndexingRadAjaxManager">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="ucUCCIndexingFilingControlsParent" LoadingPanelID="UCCRadAjaxLoadingPanel" />
</UpdatedControls>
</telerik:AjaxSetting>
</AjaxSettings>
</telerik:RadAjaxManager>
- Lastly, here is the javascript function that calls ajaxrequest. This does fire the event and the code behind runs, but I never see the loading panel.
- As you can see with the commented out code, I have even tried to show the loading panel explicitly with code, by finding it and calling the show method. No luck there either.
function saveFiling()
{
//alert("You hit ctrl-s");
//currentLoadingPanel = $find("ctl00_ContentPlaceHolder_UCCRadAjaxLoadingPanel");
//currentUpdatedControl = "ctl00_ContentPlaceHolder_ucUCCIndexingFilingControlsParent_ucFilingDetails";
//currentLoadingPanel.show(currentUpdatedControl);
$find("<%=UCCIndexingRadAjaxManager.ClientID%>").ajaxRequest("SaveLienFiling");
}