Show a Wait/ Busy cursor when button clicked

Hi Guys

I have a form using PHP/ CSS/ HTML for updating customer details and then eMailing them the revisions. The form is posted with an ‘Input: Type Image’ which updates the database prepares a bespoke HTML email and sends it. My problem is this, the above process takes a couple of seconds before the user is sent to a confirmation page which gives the feeling that nothing has happened and the probability is the user may try to click the button again.

What I need is to display a Wait cursor when the button is clicked and then return to default just prior to the redirect.

I have looked at dozens of sites and none of the stuff that people swear on their grannies grave and is the best thing since sliced bread actually works, it is mainly links or active form areas.

So as a recap what I need is :-

‘Click’-> ‘Wait cursor’ -> Do the hidden stuff -> ‘Default cursor’ -> ‘Redirect’

Thanks in anticipation

This is fairly easy using javascript. Add an onclick event to the button which is: = ‘wait’;

However, is the cursor obvious enough? Perhaps add something to the page. One common method is a spinning animated gif. In an ideal world, you should show a progress bar to make the user aware of how long it’s likely to take.

Thanks for that TomB, I have tried various javascripts; on the button; on the page etc, however, when the focus moves to the controller script from the web page the cursor reverts to default.

I have also moved on in the last ten days since I posted and what I am doing now is writing eMail info to the database. I have six or seven different eMails to send and will now use the Windows task scheduler to activate a vbscript connected to an activeX DLL which will query the DB fetch and dispatch the eMails every XX hours.

I am also going to use Microsoft CDO for Windows which seems to be much faster than the PHP equivalent and more controllable.

Thanks for your time taken to look at my problem.