Click here to Skip to main content
15,894,343 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want to show/hide loading please wait... image. How to do it?
Posted

 
Share this answer
 
v2
Comments
sunpop 10-Jul-13 12:11pm    
But it's redirecting to an intermediate page. Instead I want to show/ hide the image in the same page.
Use a "<img>" tag in your HTML with a loading.gif image and assign its Style="display:none", and in your Javascript / Jquery functions Show or hide it wherever required
 
Share this answer
 
v3
Comments
sunpop 10-Jul-13 12:13pm    
how to implement this? Till I get response from the server I want to show the image & then hide it.
Teenustar 10-Jul-13 13:13pm    
If it is an Ajax call, then you can easily implement it in the jquery method.
sunpop 10-Jul-13 13:35pm    
it's not Ajax
Teenustar 10-Jul-13 13:41pm    
what is the event that fires this task?
sunpop 10-Jul-13 13:54pm    
on button click, I'm getting response from a web method. It takes few seconds. During that time I want to show the loading image on the same page
XML
<asp:UpdateProgress id="PageUpdateProgress"
                       runat="server"
                       DisplayAfter="0"
                       DynamicLayout="true">
          <ProgressTemplate>
             <div class="loadingdiv" style="z-index: 100002 !important;">
                <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/ellipsis.gif" alt="ellipsis.gif" style="vertical-align: bottom;padding-bottom: 4px;"/>
                   </p>
                </div>
            </div>
          </ProgressTemplate>
       </asp:UpdateProgress>
 
Share this answer
 
Comments
sunpop 11-Jul-13 2:24am    
Thank u
But I used simple logic of using div,& inside that div, put the loading... image.

then on button click call
$("#divId").show();

and body, onload
$("#divId").hide();
Manu V Nath 11-Jul-13 5:18am    
Using UpdateProgress is the recommended way to building asp.net application. Your logic wont work i think. While on page refresh you will lost progress image. Please use the implementation am mentioned. Its very easy to implement. or else we will try somthing else using jquery. Let me know the status
sunpop 11-Jul-13 6:07am    
I'm new development!I think Update progress is a Ajax tool. As I'm working in Visual Studio Framework 2.0, I could not install ajax.
sunpop 11-Jul-13 6:11am    
By the way the logic I used is working well. I'll surely use Update Progress in future. Thank you so much!
Manu V Nath 11-Jul-13 6:15am    
Go ahead.... thanks.. . Also please accept as solution if its help you .....happy programming.
I've added a div, inside that div I've the loading... image.

then on button click I've called
$("#divId").show();

and body, onload
$("#divId").hide();
 
Share this answer
 
Comments
Teenustar 10-Jul-13 14:31pm    
Glad it worked :)
Please refer this.It may hellp you http://ajaxload.info/[^]
 
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