I am using Telerik:RadAjaxLoadingPanel to display the loading image on the screen when ever there is an ajaxify postback.
Following is the code:
<
telerik:RadAjaxLoadingPanel ID="radLoadingPnl" runat="server" AnimationDuration="300"
Style="vertical-align: middle;" HorizontalAlign="Center" EnableSkinTransparency="true"
BackgroundPosition="Center">
<img alt="Loading..." src="Images/loading.gif" style="border: 0px; vertical-align: middle;"
align="middle" />
</telerik:RadAjaxLoadingPanel>
//For displaying loading screen.
var loadingPanel = "";
var pageRequestManager = Sys.WebForms.PageRequestManager.getInstance();
var postBackElement = "";
pageRequestManager.add_initializeRequest(initializeRequest);
pageRequestManager.add_endRequest(endRequest);
function initializeRequest(sender, eventArgs) {
loadingPanel = $find(
'<% = radLoadingPnl.ClientID %>');
postBackElement = eventArgs.get_postBackElement().id;
loadingPanel.show(postBackElement);
}
function endRequest(sender, eventArgs) {
loadingPanel = $find(
'<% = radLoadingPnl.ClientID %>');
loadingPanel.hide(postBackElement);
}
But My Loading Image always appear next to the control because of which Ajax postback occured instead of Center of the screen.
Is there any property by which I can display the Loading image in the center of the screen for all the resolutions and for all the Ajax postbacks.
Please suggest.