Click here to Skip to main content
15,920,053 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hello Guys,

I've been searching for a code (javascript, C#.Net, Asp.net) for creating some loading effects in the master page that will be called when opening another page and also doing some events.

Ive been working it for a day..

Hope I can find some ideas or sample codes.

Thank you..

God bless. :
Posted
Updated 4-Jul-13 17:28pm
v2

Insert this javascript into your header:
JavaScript
<script type="text/javascript" language="javascript">
function OnLoad()
{
    document.getElementById("loading").style.display = 'none';    
}
window.onload = OnLoad;
</script>

Then define an
element named "loading"
HTML
<div id="loading">    
Page is loading. Please Wait...
</div>

Feel free to adjust the div's style :)
 
Share this answer
 
Try this...:)


JavaScript
<script type="text/javascript" charset="utf-8">
$("#loading").ajaxStart(function(){
    $(this).show();
}).ajaxStop(function(){
   $(this).hide();
});
</script>



HTML
<div id="loading">
   <p><img src="loading.gif" /> Please Wait</p>
</div>
 
Share this answer
 
XML
<asp:UpdateProgress id="PageUpdateProgress"
                       runat="server"
                       DisplayAfter="0"
                       DynamicLayout="true">
          <ProgressTemplate>
             <div class=" style="z-index: 100002 
                <div class="loadingcontentdiv">
                <h3>Loading...</h3>
                <img src="../Images/blueloading.gif" style="margin:0 auto;" alt="blueloading.gif"/><br />
                   <p style="font-size:12px;">
                       Communicating with server
                       <img src="../Images/img.gif" padding-bottom: 4px;"/>
                   </p>
                </div>
            </div>
          </ProgressTemplate>
       </asp:UpdateProgress>
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900