Wrox Home  
Search P2P Archive for: Go

  Return to Index  

javascript_howto thread: Feedback to the user from XMLHTTP request


Message #1 by "Marcin Wolak" <mwolak@f...> on Thu, 16 Aug 2001 15:46:57
Here is my problem:

I have a function in an onclick event of a button that instantiates an 
XMLHTTPRequest object and issues a request to the ASP page. The page 
queries the database and returns a resultset in XML. This may take 2-3 
seconds. During that time the user is unaware that some processing in 
taking place because there are no visual hints that this is happening. I 
tried to add a function immediately before the main one that would change 
the cursor to a "hand" or change something on the page. However it looks 
like the browser window is not updated before the request gets satisfied. 
So I have some split second change just before the results get displayed - 
not what I or the user wants. I played with "setTimeout" method of Window 
object, but unsuccessfully so far. Does anyone have a nice solution to 
that one?

Marcin.

  Return to Index