By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,782 Members | 1,154 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,782 IT Pros & Developers. It's quick & easy.

Displaying a spinner

P: n/a
When posting an AJAX request to update multiple page elements, how do
I display a spinner in the elements until the request completes?
Jan 9 '08 #1
Share this Question
Share on Google+
7 Replies


P: n/a
kevin cline said the following on 1/9/2008 5:24 PM:
When posting an AJAX request to update multiple page elements, how do
I display a spinner in the elements until the request completes?
Make the request, put a spinning gif in the container, replace the
spinning gif when the request completes.

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/index.html
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Jan 9 '08 #2

P: n/a
Randy Webb wrote on 09 jan 2008 in comp.lang.javascript:
kevin cline said the following on 1/9/2008 5:24 PM:
>When posting an AJAX request to update multiple page elements, how do
I display a spinner in the elements until the request completes?

Make the request, put a spinning gif in the container, replace the
spinning gif when the request completes.
I thought he requested Ajax to incarcerate a male spinster.
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jan 9 '08 #3

P: n/a
On Jan 9, 4:35 pm, Randy Webb <HikksNotAtH...@aol.comwrote:
kevin cline said the following on 1/9/2008 5:24 PM:
When posting an AJAX request to update multiple page elements, how do
I display a spinner in the elements until the request completes?

Make the request, put a spinning gif in the container, replace the
spinning gif when the request completes.
Thanks, but do the browsers have standard spinners built in?
Jan 10 '08 #4

P: n/a
On Wed, 09 Jan 2008 16:02:06 -0800, kevin cline wrote:
On Jan 9, 4:35 pm, Randy Webb <HikksNotAtH...@aol.comwrote:
>kevin cline said the following on 1/9/2008 5:24 PM:
When posting an AJAX request to update multiple page elements, how do
I display a spinner in the elements until the request completes?

Make the request, put a spinning gif in the container, replace the
spinning gif when the request completes.

Thanks, but do the browsers have standard spinners built in?
alert("WARNING: You will need a Twister spinner to continue")

// Later
alert("Flick your Twister spinner so you feel important.\n"+
"Don't forget to close this window.");
Jan 10 '08 #5

P: n/a
On Jan 9, 4:02 pm, kevin cline <kevin.cl...@gmail.comwrote:
On Jan 9, 4:35 pm, Randy Webb <HikksNotAtH...@aol.comwrote:
kevin cline said the following on 1/9/2008 5:24 PM:
When posting an AJAX request to update multiple page elements, how do
I display a spinner in the elements until the request completes?
Make the request, put a spinning gif in the container, replace the
spinning gif when the request completes.

Thanks, but do the browsers have standard spinners built in?
That's not a bad question, but it would be the OS that has the spinner
if you're talking about what the mouse pointer does when the browser
is busy.

I just tried this in jQuery...

$(this).css("cursor","wait");

....and it shows the hourglass, spinning blue circle, or whatever your
OS has for a busy. So if it's the mouse pointer you're looking to
change to its busy state, I think that's your answer. Change the
cursor to "wait".
Jan 10 '08 #6

P: n/a
timothytoe wrote:
On Jan 9, 4:02 pm, kevin cline <kevin.cl...@gmail.comwrote:
>On Jan 9, 4:35 pm, Randy Webb <HikksNotAtH...@aol.comwrote:
>>kevin cline said the following on 1/9/2008 5:24 PM:
When posting an AJAX request to update multiple page elements, how do
I display a spinner in the elements until the request completes?
Make the request, put a spinning gif in the container, replace the
spinning gif when the request completes.
Thanks, but do the browsers have standard spinners built in?

That's not a bad question, but it would be the OS that has the spinner
if you're talking about what the mouse pointer does when the browser
is busy.
1. Some browsers provide their own pointing-device cursors.

2. You would be referring to Mac OS X's default behavior only:
http://en.wikipedia.org/wiki/Spinning_wait_cursor

3. Probably pointing-device cursors were not meant but instead items like
these:

http://www.yup.com/articles/2006/05/...ners-for-ajax/
I just tried this in jQuery...
Oh, please. Search the archives for jQuery and why to eschew it.
PointedEars
--
realism: HTML 4.01 Strict
evangelism: XHTML 1.0 Strict
madness: XHTML 1.1 as application/xhtml+xml
-- Bjoern Hoehrmann
Jan 10 '08 #7

P: n/a
kevin cline wrote:
On Jan 9, 4:35 pm, Randy Webb <HikksNotAtH...@aol.comwrote:
>kevin cline said the following on 1/9/2008 5:24 PM:
>>When posting an AJAX request to update multiple page elements, how do
I display a spinner in the elements until the request completes?
Make the request, put a spinning gif in the container, replace the
spinning gif when the request completes.

Thanks, but do the browsers have standard spinners built in?
They have, and for example in Firefox you could use this URI:

chrome://global/skin/throbber/Throbber-small.gif

(That's easy enough to find out with the DOM Inspector.)

However, the problem is to detect Firefox (or any other browser for
that matter), provided you even can refer to the animation with an URI:

http://PointedEars.de/scripts/test/whatami

So you better refer to your own image resources.
PointedEars
--
var bugRiddenCrashPronePieceOfJunk = (
navigator.userAgent.indexOf('MSIE 5') != -1
&& navigator.userAgent.indexOf('Mac') != -1
) // Plone, register_function.js:16
Jan 10 '08 #8

This discussion thread is closed

Replies have been disabled for this discussion.