Processing Bar while Page loads

Posted by Murugavelmsc under JavaScript on 7/15/2015 | Points: 10 | Views : 371 | Status : [Member] | Replies : 1
Hi Experts,

I have created a page as follows:

<body id="body" onload="javascript:fnPageInitialise();">
<div> <!-- mainForm -->

In the fnPageInitialise() has more time to load time to display the date.

So thats i want to display processing icon to user knows the pages is loading.

Browsers: IE

Thanks in advance.

Murugavel S

Murugavel S


Posted by: A2H on: 7/15/2015 [Member] [MVP] Bronze | Points: 25

You can use the Jquery code to show a loading icon on pageload like given below
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<html xmlns="">
<head id="Head2" runat="server">
<!-- jQuery Plugin -->
<script src="//"></script>

<script type="text/javascript">
// Change the value 5000 to a limit till your Gridview load completely
$(window).load(function () { $("#spinner").fadeOut(5000); })
<style type="text/css">
#spinner {
position: fixed;
left: 0px;
top: 0px;
width: 100%;
height: 100%;
z-index: 9999;
/*Add a loading image here*/
background: url(Your Loading Image Path) 50% 50% no-repeat #ede9df;
<form id="form2" runat="server">
<asp:ScriptManager ID="ScriptManager2" runat="server" EnablePageMethods="true">
<!-- Preloader -->
<div id="spinner"></div>

<div id="content">
<!-- Your content here-->

Sample Demo here :,css,js,output

Please mark my reply as answer if it helps to resolve your problem

Murugavelmsc, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response