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

Loading panel doesn't show.

1 Answer 106 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Mike
Top achievements
Rank 1
Mike asked on 05 Mar 2010, 01:20 PM
Hi there,

I am trying to use the method to explicitly show/hide the loading panel. My code is:

<

 

telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">

 

 

<AjaxSettings>

 

 

<telerik:AjaxSetting AjaxControlID="btnImport">

 

 

<UpdatedControls>

 

 

<telerik:AjaxUpdatedControl ControlID="Panel5" LoadingPanelID="LoadingPanel1" />

 

 

</UpdatedControls>

 

 

</telerik:AjaxSetting>

 

 

</AjaxSettings>

 

 

<ClientEvents OnRequestStart="RequestStart" OnResponseEnd="ResponseEnd" />

 

 

</telerik:RadAjaxManager>

 

 

<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server"

 

 

Skin="Vista">

 

 

</telerik:RadAjaxLoadingPanel>

 

 

<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">

 

 

<script type="text/javascript">

 

 

var currentLoadingPanel = null;

 

 

var currentUpdatedControl = null;

 

 

function RequestStart(sender, args) {

 

alert(

"Should Load");

 

currentLoadingPanel = $find(

"<%= RadAjaxLoadingPanel1.ClientID %>");

 

 

if (args.get_eventTarget() == "<%= btnImport.UniqueID %>") {

 

currentUpdatedControl =

"<%= Panel5.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>

And I try and call it by:

 

RadAjaxManager1.ResponseScripts.Add(

"RequestStart();");

But i can't get it to show.
Can someone help figure out what Im doing wrong?

Thanks

 

1 Answer, 1 is accepted

Sort by
0
robertw102
Top achievements
Rank 1
answered on 05 Mar 2010, 07:23 PM
I noticed that you set the LoadingPanelID for the Panel5 ajax setting to LoadingPanel1, instead of RadAjaxLoadingPanel1. Perhaps that is the issue.

Also, if you are setting that setting there, I don't see why you would need to set it explicitly when you aren't changing the target element to show the LoadingPanel on.
Tags
Ajax
Asked by
Mike
Top achievements
Rank 1
Answers by
robertw102
Top achievements
Rank 1
Share this question
or