Showing a <div> whilst a long running process is occuring

K

Kieran Benton

Hi, I'm using AJAX.NET to do a back end lookup and would like to
display a <div> constaining some text to the effect of "Please wait"
whilst it is running and then hide it once it is finished. At the
moment I set the style "display" property to "none" to hide the box and
then reset it to show it. This works, but becasue I'm doing the show ->
lookup -> hide in one javascript method, the tet never appears! What is
the best way round this? Cheers.
 
C

Christopher J. Hahn

Kieran said:
Hi, I'm using AJAX.NET to do a back end lookup and would like to
display a <div> constaining some text to the effect of "Please wait"
whilst it is running and then hide it once it is finished. At the
moment I set the style "display" property to "none" to hide the box and
then reset it to show it. This works, but becasue I'm doing the show ->
lookup -> hide in one javascript method, the tet never appears! What is
the best way round this? Cheers.


I'm not familiar with AJAX.NET, but I would do the lookup
asynchronously and split the process into two functions:

show > lookup

receive/callback > hide


Add a way out and some added fault-tolerance-- any number of possible
occurrences may prevent the lookup from ever completing.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top