473,498 Members | 1,972 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

show spinner gif while data is retrieving

31 New Member
Hi,

I am developing a system using asp.net, ajax and javascripts. I have an interface that display user details. when the user enters the Id and press search button the user details will be retrieved from the database and showed in the fields. i use a javascript function that calls an ajax method in the server side.

while the system is retrieving data from the database I want to display a spinner gif as in this link http://www.mpire.com/images/sunbox_spinner.gif . this gif file is saved in a local folder. I tried with setting visibility=' visible' of the gif at the begining of the search finction and setting it 'hidden' at the end. but it didn't work.

can anyone help me?
Apr 22 '08 #1
4 4200
gits
5,390 Recognized Expert Moderator Expert
please post the code you used and which is not working ... so that we may have a closer look at this. usally visibility should work while display = 'none' or 'block' should work too ... how did you refer to the image? when did you try to set the state of it?

kind regards
Apr 22 '08 #2
anudu
31 New Member
This is the javascript code

Expand|Select|Wrap|Line Numbers
  1. function searchCustomerInfo()
  2.  {
  3.  
  4.  
  5.  
  6.   document.getElementById("img1").style.visibility = "visible";
  7.  
  8. // the code to get data from data base and set to fields
  9. //
  10. // 
  11.  document.getElementById("img1").style.visibility = "hidden";
  12.  
  13. return false;
  14.  
  15.  
  16. }
as I realized that if I commented the line to hide the image , the image was shown on the interface but only after all the other actions were completed.
Apr 22 '08 #3
gits
5,390 Recognized Expert Moderator Expert
this line:

Expand|Select|Wrap|Line Numbers
  1. document.getElementById("img1").style.visibility = "hidden";
should be called in the onreadystatechange-handler when the response is ready ...

kind regards
Apr 22 '08 #4
jcumoletti
6 New Member
you also have to make sure you are doing thins asyncronously or the gif wont animate
Apr 22 '08 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

4
2270
by: Vinod | last post by:
Hi, I want to know how we can create a time spinner , similar to the the one which we can see in Date/Time properties , when we click it. I want to include it in my asp program. Thanks in...
1
1404
by: MSDousti | last post by:
Hello I want to put a Spinner and set an Edit to its Buddy. I have some problems: 1- I want the spinner to add/subtract 0.01 to/from the number shown in Edit, but it just works with...
0
974
by: Gary Townsend | last post by:
I am hoping someone can poit me in a right direction for how is should look at implementing this with efficiency I have a form which has a combo box with a list of Schools this is the top level...
1
2682
by: JLD | last post by:
I need to know the commands in DOS to create a batch file that produces a spinner in DOS. I am in desperate need. I have searched all over the web and have found nothing. I also need to know if I...
6
12059
by: Guy Noir | last post by:
Hello. Is there a way to make the spinner control "Rollover" In other words, when we hit the down button on the control and reach zero, if I press down again I would like it to rollover to 9. ...
130
6373
by: Daniel Manes | last post by:
I'm baffled. I have a column in a SQL Server Express database called "Longitude," which is a float. When I view the table in a DataGridView, some of the numbers, which only have two decimal places...
5
1960
by: Sanjay Pais | last post by:
I have a table with over 1.3 million rows. I am retrieving only 20 at a time using the with - over clauses In query analyser, the data is retrieved in under a second. When retrieving using the...
7
8811
by: kevin cline | last post by:
When posting an AJAX request to update multiple page elements, how do I display a spinner in the elements until the request completes?
1
1945
by: Brian | last post by:
How do i make the spinner control... spin the time... like the windows time setting?
0
7125
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7004
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7167
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7208
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7379
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5464
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4915
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4593
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
1423
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.