0
response = service.getInfo(request);

How can I display an image while my response object is being populated? Service is a web service located on another server that I have no control over.

Any help is greatly appreciated.

divided
  • 1,249
  • 5
  • 14
  • 27
  • 1
    This needs a lot more information! – Hawxby Feb 07 '11 at 20:19
  • You could use the asynchron methods of the web service, and hide the image when the asynchron completion event is fired. – Uwe Keim Feb 07 '11 at 20:19
  • @Hawxby - what else does it need? – divided Feb 07 '11 at 20:31
  • @Uwe - do you have an example? – divided Feb 07 '11 at 20:32
  • Well a bit of detailing as to how you would like to do it. For example in such a situation I may default my page to a loading state then fire an ajax request either back to my application or the 3rd party service to download the data. Once the data has finished downloading then I would use jQuery to make whatever changes needed, remove the image, etc. When a new request is fired I'd set it up to display the loading image, rinse and repeat – Hawxby Feb 07 '11 at 20:53
  • @divided Sorry, I was assuming Windows Forms. – Uwe Keim Feb 08 '11 at 05:49
  • @Hawxby - I'd like to just use a while() and display the image while the content is loading. Is that possible? – divided Feb 09 '11 at 13:57

1 Answers1

1

Here is one way to do it.

The bottom line is that you will need some asynchronous process going on. And that implies AJAX. The library or methodology you use is up to you.

Community
  • 1
  • 1
Bryan
  • 8,748
  • 7
  • 41
  • 62