Although it's very uncommon (and generally bad practice) in a web app
to have really blocking events (since users can navigate away from a
page or close the window while the request is running), if you really
want to do that, you have to make sure the user isn't able to click
anything else while the request is being processed. Insert a full
window overlay into the document, make sure it indicates that the
application can't be used and they must wait. If you insist on the
hourglass, just define it in the CSS of the overlay.
On 18 Nov 2009, at 22:38, JoJo wrote:
I am making a website with an embedded app, so it is very much like a
desktop application. There are blocking events.
On Nov 18, 12:12 am, Peter De Berdt peter.de.be...@pandora.be wrote:
On 18 Nov 2009, at 01:30, JoJo wrote:
When the user clicks a button, I want to show an hourglass cursor
while its onclick handler is being run. I tried this:
$$('body').first().setStyle({cursor: 'progress'});
The hourglass only appears when I hover over the body background.
When
hovering over the button itself (which is an a), the cursor does
not
show the hourglass. How do I get the hourglass to appear regardless
of where I'm pointing?
Well, this topic has come up before (I even replied to the thread
back
then) on the Rails mailing
list:http://www.mail-archive.com/rubyonrails-t...@googlegroups.com/msg4033
...
Anyway, I can tell you for sure it doesn't work, it will never work
and to be honest, an hourglass cursor is just a bad idea. Cursor
changes like that should only be used for blocking events, that's
what
we're used to from desktop apps. In a web app, there simply are no
blocking events. If you really have an action that should prevent the
user from doing anything else, you'll have to be more persistent and
put an overlay over the whole application, so they really can't click
anything. If you're really so fond of using a wait cursor, you can
set
is as the style for that overlay. For everything else: just use a
loading indicator that you show and hide somewhere on the screen.
Best regards
Peter De Berdt
--
You received this message because you are subscribed to the Google Groups
Prototype script.aculo.us group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/prototype-scriptaculous?hl=.