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

show loading panel on initial pageload

3 Answers 269 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
JJ
Top achievements
Rank 1
JJ asked on 20 Jul 2011, 03:19 AM
Do you have an example that doing the same thing as http://www.telerik.com/help/aspnet-ajax/ajax-show-loadingpanel-on-initial-pageload.html, but there are there are several user controls on the page (tab/pageview).

I think this should use radajaxmanagerproxy?  I have read http://www.telerik.com/help/aspnet-ajax/ajax-ajaxmanagerproxy.html but can't make it work. Can you give a code example for showing loading panel on initial pageload while there are several user control's on the page, tab/pageview, when each tab clicks - new page loads and the ajax loading panel needs to show on initial pageload

Thanks!

3 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 20 Jul 2011, 05:19 AM
Hello JJ,

You can try the same approach in the following help documentation to show the loading panel on initial page load.
Show AJAX Loading Panel on initial page load.

Thanks,
Princy.
0
JJ
Top achievements
Rank 1
answered on 20 Jul 2011, 07:23 PM

when use the fofloowing code, I got javascript error: this.get_element is null or not an object.

If I removed this code, no javascript error, but ajaxlpadingpanel won't show on page load.

I have ajaxmanager , ajaxloadingpanel, panel are all on ascx file, where, there is a radgrid on the ascx control. 
The error happens after the grid finishes loading. I can ajasloading panel working fine before the grid load. Usually the error happens the second when go to this page, first time ususaly no error.  The error stops at:

"{

 

var d=this.get_element().getElementsByTagName("input")[0];

 

var

 

 

c=d?d.getAttribute("type"):"false";" on the ScriptResource.axd

 


Any thoughts to solve this issue?

<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
  
<script type="text/javascript">
  
function pageLoad(sender, eventArgs) {
  
if (!eventArgs.get_isPartialLoad()) {
  
$find("<%= RadAjaxManager1.ClientID %>").ajaxRequest("InitialPageLoad");
  
}
  
  
</script>
  
</telerik:RadCodeBlock>
----------------------------------

 

 

protected void RadAjaxManager1_AjaxRequest(object sender, Telerik.Web.UI.AjaxRequestEventArgs e)

 

{

 

 

try

 

{

 

 

if (e.Argument == "InitialPageLoad")

 

{

rgMygrid.Rebind();

Panel2.Visible =

 

true;

 

}

}

}


Thanks
0
Maria Ilieva
Telerik team
answered on 25 Jul 2011, 09:47 AM
Hello Jj,

Please find attached a sample runnable application which represents similar scenario as you have described and show LoadingPanel on initial page load properly. Test it on your side and let me know if it works for you and what the deference in your case is.

Kind regards,
Maria Ilieva
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

Tags
Ajax
Asked by
JJ
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
JJ
Top achievements
Rank 1
Maria Ilieva
Telerik team
Share this question
or