[Javascript] Mouse cursor for AJAX projects?
David Hucklesby
davidh126 at writeme.com
Mon May 12 23:08:36 CDT 2008
On Sat, 10 May 2008 07:48:06 -0500, Skip Evans wrote:
> Hey all,
>
> I've been developing sites running 100% AJAX communication between client and server,
> and one issue I have yet to solve is that when a link is selected in the browser we
> don't see anything indicating the browser is waiting for the server to respond, like
> the spinning graphics and stuff in the top right corner of IE and FF.
>
> I have seen some implementation that make the cursor spin to clue the user that the
> system is working, but can't find a code snippet or documentation explaining how to
> implement this.
>
> Anyone have any suggestions?
I don't know how to make the cursor spin, but showing an animated GIF on
submitting the request, then hiding it again when the request returns
might work for you.
HTML
<span><span class="waiting"> </span></span>
CSS
.waiting {
display:block;
width: 32px; /* whatever */
height: 32px: /* " " */
background: url(images/rotating.gif) no-repeat center;
visibility: hidden;
}
Toggle the visibility to "visible" and back via your script.
The extra span is to keep the box "inline" and may not be needed.
Cordially,
David
--
More information about the Javascript
mailing list