Saturday, October 18, 2014

load image using javascript

Posted by Gnani Palepu  |  No comments


 if you want more related search please click here  
 please help to other  
 http://scriptquery.blogspot.in/  

 Loading image when the page is loading using javascript  
 ---------------------------------------------------------------------  
 simple code for this, fallow these steps that's it  
 step1  
 -----  
 first we have to go master page,  
 <asp:UpdateProgress ID="UpdateProgress" runat="server">  
       <ProgressTemplate>  
         <div id="loading" style="position: absolute; width: 100%; text-align: center; top: 280px;  
           z-index: 200000; left: -1px;" enableviewstate="false">  
           <asp:Image ID="Image1" runat="server" ImageUrl="~/images/ajax-loader.gif" EnableViewState="false" />  
         </div>  
       </ProgressTemplate>  
 </asp:UpdateProgress>  
 and copy the image also what ever image u want  
 step 2  
 -----  
 script  
 ------  
 go to end of the page, above the html tag paste this script  
 <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">  
   <script language="javascript" type="text/javascript">  
     var ld = (document.all);  
     var ns4 = document.layers;  
     var ns6 = document.getElementById && !document.all;  
     var ie4 = document.all;  
     if (ns4)  
       ld = document.loading;  
     else if (ns6)  
       ld = document.getElementById("loading").style;  
     else if (ie4)  
       ld = document.all.loading.style;  
     function init() {  
       if (ns4) { ld.visibility = "hidden"; }  
       else if (ns6 || ie4) ld.display = "none";  
     }  
   </script>  
 </telerik:RadCodeBlock>  
 after then drag the image url and cut and paste andthen run...  
 happy coding  

 if you want more related search please click here  
 please help to other  
 http://scriptquery.blogspot.in/  


11:33 PM Share:

0 comments:

Get updates in your email box
Complete the form below, and we'll send you the best coupons.

Deliver via FeedBurner
Proudly Powered by Blogger.
back to top