473,624 Members | 2,302 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 4216
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 onreadystatecha nge-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
2277
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 advance
1
1412
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 integers(0,1,2,3,etc.) 2-When I press ENTER on the Edit box, it terminates my program and returns to my code (without any error)
0
981
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 of the relationship There is a second combobox which lists the School Bus Routes related to the above school Finally there is a datagrid which lists the bus stops for the selected
1
2685
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 can save it to a CD or not. Can anyone help me please!?
6
12081
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. And when I hit up and I finally come to 9, I would like the next up press to hit 0. I'm assuming I'll need to write the action myself, but I'm kind of at a
130
6521
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 in the database show up with *15* decimal places and are ever so slightly off (in the example in the subject line, by about 2E-15). I'm not doing any operations on this column. It's just running a stored procedure which performs a pretty basic...
5
1971
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 data adaptor.fill or datareader to retrieve the data it takes over 24 seconds. public System.Data.SqlClient.SqlDataReader List1(int PageIndex, int PageSize, string ItemName, string UserIDs, DateTime DateStart, DateTime DateEnd, int status,...
7
8817
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
1952
by: Brian | last post by:
How do i make the spinner control... spin the time... like the windows time setting?
0
8681
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8341
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8488
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6112
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4084
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4183
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2611
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 we have to send another system
1
1793
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1488
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.