Author: MicroMetal | Posted on: 12/31/2008 7:59:48 AM | Views : 225

I have a webservice setup on an Intranet that returns some stuff, being on the intranet it is almost instant.

The problem is people still end up finding ways to submit the page before it returns.

The javascript writes the results of the webservice to a label, I would like to provide some sort of "loading..." or whatever there so that the person knows to hold thier horses.  If its possible I would also like to be able to disable the submit button, and have a timer checking to see how long its been, maybe keep the button off for 2 seconds or somethign. (if the webservice is down I dont want it locking up the page)

I know there are several states in AJAX, but im not sure how to check if the call is done and how long its been waiting.

BTW the updatepanel is not an option because the controls I am using conflict with it, those lovely sharepoint controls.

my current code is like this.

 

Go to the complete details ...