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

Using AjaxLoading Panel

2 Answers 120 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Keith
Top achievements
Rank 1
Keith asked on 15 Sep 2008, 06:38 PM
Hello;

I am trying to use the AjaxLoading Panel when I use a calendar control event which when the date is selected, opens a new window to display the results of the query based on the date selected and leaves the parent window open in the background. I want the loading to be displayed on the parent window until the new window is rendered.

Thanks,
Keith 

2 Answers, 1 is accepted

Sort by
0
Keith
Top achievements
Rank 1
answered on 15 Sep 2008, 09:05 PM
Additional information.

When trying to use the following code:

ASPX:

<asp:ScriptManager ID="ScriptManager" runat="server" />

<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" OnAjaxRequest="RadAjaxManager1_AjaxRequest">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="RadAjaxManager1">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="Panel1" LoadingPanelID="RadAjaxLoadingPanel1" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManager>

<asp:Panel ID="Panel1" runat="server">
    <asp:Panel ID="Panel2" Visible="false" runat="server">
     My content:
   </asp:Panel>
</asp:Panel>
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Height="75px" Width="75px" Transparency="50">
    <img alt="Loading..." src='<%= RadAjaxLoadingPanel.GetWebResourceUrl(Page, "Telerik.Web.UI.Skins.Default.Ajax.loading.gif") %>' originalAttribute="src" originalPath="<%= RadAjaxLoadingPanel.GetWebResourceUrl(Page, "Telerik.Web.UI.Skins.Default.Ajax.loading.gif") %>" originalAttribute="src" originalPath="<%= RadAjaxLoadingPanel.GetWebResourceUrl(Page, "Telerik.Web.UI.Skins.Default.Ajax.loading.gif") %>" originalAttribute="src" originalPath="<%= RadAjaxLoadingPanel.GetWebResourceUrl(Page, "Telerik.Web.UI.Skins.Default.Ajax.loading.gif") %>" originalAttribute="src" originalPath="<%= RadAjaxLoadingPanel.GetWebResourceUrl(Page, "Telerik.Web.UI.Skins.Default.Ajax.loading.gif") %>" style="border:0;" />
</telerik:RadAjaxLoadingPanel>

 

[C#]

    protected void RadAjaxManager1_AjaxRequest(object sender, Telerik.WebC.UI.AjaxRequestEventArgs e)
    {
        if (e.Argument == "InitialPageLoad")
        {
            //simulate longer page load
            System.Threading.Thread.Sleep(2000);
            Panel2.Visible = true;
        }
    }


I get the following error:

Microsoft JScript runtime error: 'null' is null or not an object
0
Konstantin Petkov
Telerik team
answered on 16 Sep 2008, 06:39 AM
Hello Keith,

This is a JavaScript error so can you share the JavaScript which triggers the AJAX request? Do you get the RadAjaxManager client object through the $find() ASP.NET AJAX function? Please review the RadAjax client-side API described here.

Kind regards,
Konstantin Petkov
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Ajax
Asked by
Keith
Top achievements
Rank 1
Answers by
Keith
Top achievements
Rank 1
Konstantin Petkov
Telerik team
Share this question
or