SharePoint 2013/2010 - To show waiting screen/image while loading in background.
Pre-Setup: Please download and link the source file to jquery-1.10.2.js. Link to approprite bg imane abd loader image. Set the mail JavaScript in the master page for reuse of the code.<script src="jquery-1.10.2.js"></script>
<style>
#loading { display:none; position:fixed; left:0; top:100; width:98%; height:100%; background-image:url("/bg.png"); }
</style>
<script type="text/javascript" language="javascript">
function block_screen() {
$("#loading").show();
document.getElementById('contentRow').style.display = 'block';
}
function unblock_screen() {
$("#loading").hide();
document.getElementById('contentRow').style.display = 'block';
}
</script>
<div id="loading" >
<div id="loadingImage" style="position:fixed; left:450px; top:400px;">
<img src="loader.gif" /> </div>
</div>
/*To Block Screen and Show waiting gif*/
<script type="text/javascript" language="javascript">
block_screen();
</script>
/*To Unblock Screen*/
<script type="text/javascript" language="javascript">
unblock_screen()
</script>
Happy Browsing!
Relax..
Relax..
No comments:
Post a Comment