This is a common problem.
When you click a button on a page, it typically posts the whole page back to the server - and the whole page needs to be sent back to the browser with the results.
However, this does not have to be the case. You CAN call a server function asyncronously (ie. without the current browser page being sent to the server). WHY? Because then you can pop-up a window or frame with an hourglass gif, or a table that fills with a colour or some other way to indicate that things are happening. Then you call the function (asp page with parameters).
When it returns, you hide the pop-up window/frame. I am not sure if you can change the cursor shape.
Here are some methods...
1. Use the Page Object DTC. Write a function in server-side code. Add this function to the PageObjectDTC in the EXECUTE list (first tab, lower list).
Now in Client-Side code (i.e. an onclick event of a button) you can call this function via javascript as thisPage.execute.<functionName(parameters)>.
This method uses a java applet. Some users are prevented from running java - so it may fail. Otherwise, it is very easy to use.
.OR.
2. Create a hidden frame. You can cause the frame to refresh via the client-side
<framename>.window.location.href <asppage?parameters>
This will return a web page back to the hidden frame - in which you can include javascript functions. By executing the java code, it can pass values back to your main (visible) page via parent.form type syntax.
This is a but tricky to use (and understand) but it can be used by most browsers.
.OR.
3. If your users are using IE., then you can use the XML DOM facility. This lets you call an ASP page, and the results are returned as XML, rather than HTML. This makes using complex return values somewhat easier to use. In some respects it is easier to use than method 2 above.
4. If you look at the conquerChat facility (
you may see that it uses a variation in the hidden frame. It finds the HEAD tag, and adds a JavaScript Script tag with the source of an ASP page. The browser will immediately fetch the Javascript by calling the identified ASP page. The resulting javascript is fed back into the browser - i.e. with any data that you requested.
The phrase 'When it returns' above depends on the method that you select. Options 1 and 3 (DTC and XML) you get the results following the call - so you hide your 'please wait' message in the same piece of code.
But options 2 and 4 (Hidden Frame/HEAD element rewrite) the return value is a complete HTML or JavasScript chunk. There would have to be something in this returned JavaScript that turns off the 'please wait' message.