HighDots Forums  

FAQ Topic - I have window.status="Moomin"; why doesn't the statusbar change? (2009-11-04)

Javascript JavaScript language (comp.lang.javascript)


Discuss FAQ Topic - I have window.status="Moomin"; why doesn't the statusbar change? (2009-11-04) in the Javascript forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
FAQ server
 
Posts: n/a

Default FAQ Topic - I have window.status="Moomin"; why doesn't the statusbar change? (2009-11-04) - 11-03-2009 , 07:00 PM






-----------------------------------------------------------------------
FAQ Topic - I have window.status="Moomin"; why doesn't the
statusbar change?
-----------------------------------------------------------------------

When changing the status in an event (e.g. ` onmouseover `) you
should return true from the event. Also a number of browsers
require a short delay before setting the status to overcome their
default behaviour with the statusbar. `
onevent="setTimeout('window.status=\'Moomin\'',15) ;" `
Most browsers are configured, by default, to disallow scripts from setting
the status bar text.


The complete comp.lang.javascript FAQ is at
http://jibbering.com/faq/

--

The sendings of these daily posts are proficiently hosted
by http://www.pair.com.

Reply With Quote
  #2  
Old   
Dr J R Stockton
 
Posts: n/a

Default Re: FAQ Topic - I have window.status="Moomin"; why doesn't the statusbar change? (2009-11-04) - 11-04-2009 , 05:20 PM






In comp.lang.javascript message <4af0c409$0$278$14726298 (AT) news (DOT) sunsite.dk
Quote:
, Wed, 4 Nov 2009 00:00:02, FAQ server <javascript (AT) dotinternet (DOT) be
posted:
-----------------------------------------------------------------------
FAQ Topic - I have window.status="Moomin"; why doesn't the
statusbar change?
-----------------------------------------------------------------------

When changing the status in an event (e.g. ` onmouseover `) you
should return true from the event. Also a number of browsers
require a short delay before setting the status to overcome their
default behaviour with the statusbar. `
onevent="setTimeout('window.status=\'Moomin\'',15) ;" `
Most browsers are configured, by default, to disallow scripts from setting
the status bar text.
AFAICS, IE allows, FF does not, Opera allows ; Safari & Chrome don't
have a bar. But I may have changed settings from default.

The current answer only refers to after an event. But the bar can be
changed without any event, both my IE & my Opera show it changing on
running the page

<script>
J=88888
while(J--) window.status=J
</script>

IE appears to show every number; Opera to show samples.

Assume a page which calculates solidly for a whole two seconds, in the
middle of which it calls the FAQ's
setTimeout('window.status=\'Moomin\'', 15);
Will that delay usually or always help? Should the delay be started
only when other action is about to stop, or at the start of a forced
pause?

--
(c) John Stockton, nr London UK. ?@merlyn.demon.co.uk Turnpike v6.05 MIME.
<URL:http://www.merlyn.demon.co.uk/> TP/BP/Delphi/&c., FAQqy topics & links;
<URL:http://www.merlyn.demon.co.uk/clpb-faq.txt> RAH Prins : c.l.p.b mFAQ;
<URL:ftp://garbo.uwasa.fi/pc/link/tsfaqp.zip> Timo Salmi's Turbo Pascal FAQ.

Reply With Quote
  #3  
Old   
Garrett Smith
 
Posts: n/a

Default Re: FAQ Topic - I have window.status="Moomin"; why doesn't the statusbarchange? (2009-11-04) - 11-05-2009 , 03:26 AM



Dr J R Stockton wrote:
Quote:
In comp.lang.javascript message <4af0c409$0$278$14726298 (AT) news (DOT) sunsite.dk
, Wed, 4 Nov 2009 00:00:02, FAQ server <javascript (AT) dotinternet (DOT) be
posted:
-----------------------------------------------------------------------
FAQ Topic - I have window.status="Moomin"; why doesn't the
statusbar change?
-----------------------------------------------------------------------
There is no good reason for doing this.

Can we remove this one?

This is like an old, bad NS4 trick. Doesn't get asked and no sense
encouraging it.

If a status bar change is triggered by the user interacting with
something, it (the status bar) is usually very far from the actual thing
that the user is interacting with.

A better user experience (U/X) is to provide status notification on the
page (title, tooltip, changing text).

Quote:
When changing the status in an event (e.g. ` onmouseover `) you
should return true from the event. Also a number of browsers
require a short delay before setting the status to overcome their
default behaviour with the statusbar. `
onevent="setTimeout('window.status=\'Moomin\'',15) ;" `
Most browsers are configured, by default, to disallow scripts from setting
the status bar text.

AFAICS, IE allows, FF does not, Opera allows ; Safari & Chrome don't
have a bar. But I may have changed settings from default.

Mobile devices will probably be mostly status-bar free.

Quote:
The current answer only refers to after an event.
It does so because if called in an onmouseover, the status bar change
interferes with something the default action (behaviour).

But the bar can be
Quote:
changed without any event, both my IE & my Opera show it changing on
running the page

script
J=88888
while(J--) window.status=J
/script

IE appears to show every number; Opera to show samples.

Assume a page which calculates solidly for a whole two seconds, in the
middle of which it calls the FAQ's
setTimeout('window.status=\'Moomin\'', 15);
Will that delay usually or always help? Should the delay be started
only when other action is about to stop, or at the start of a forced
pause?

Don't calculate for two seconds.

Break the calculation into chunks. Use setTimeout to execute each
chunk until done. Display update notifications on the page, not in the
status bar.
--
Garrett
comp.lang.javascript FAQ: http://jibbering.com/faq/

Reply With Quote
  #4  
Old   
Dr J R Stockton
 
Posts: n/a

Default Re: FAQ Topic - I have window.status="Moomin"; why doesn't the statusbar change? (2009-11-04) - 11-05-2009 , 04:20 PM



In comp.lang.javascript message <hcu27a$p7i$1 (AT) news (DOT) eternal-
september.org>, Thu, 5 Nov 2009 00:26:13, Garrett Smith
<dhtmlkitchen (AT) gmail (DOT) com> posted:
Quote:
Dr J R Stockton wrote:
In comp.lang.javascript message <4af0c409$0$278$14726298 (AT) news (DOT) sunsite.dk
, Wed, 4 Nov 2009 00:00:02, FAQ server <javascript (AT) dotinternet (DOT) be
posted:
-----------------------------------------------------------------------
FAQ Topic - I have window.status="Moomin"; why doesn't the
statusbar change?
-----------------------------------------------------------------------

There is no good reason for doing this.
Your experience is limited. Those with different experience can think
of reasons that you apparently cannot envisage.

Remember that JavaScript, even in a browser, is a general-purpose
language and can be used in many ways quite different from "trade" ones
such as puffing and ordering goods.

Quote:
Can we remove this one?

This is like an old, bad NS4 trick. Doesn't get asked and no sense
encouraging it.

If a status bar change is triggered by the user interacting with
something, it (the status bar) is usually very far from the actual thing
that the user is interacting with.
That is not the only way in which the bar can be changed. It can be
used as a continuous progress indicator, for example.

And remember that utility does not reside only in a finished, published
Web page; progress code can usefully be included during design-and-test
time and perhaps removed from the published version.

It can be a positive advantage that the status is being shown on a bar
at the foot; of late I have frequently had Opera doing a full scan with
<URL:http://www.merlyn.demon.co.uk/linxchek>, taking about a minute,
with its progress/status bar peeping out from some completely different
task (like loading <http://www.bbc.co.uk/iplayer/episode/b00nky5d/Breakf
ast_Thursday_Sara_MohrPietsch/>). Status can matter and change even
when the page is not being (as far as it knows) interacted with.


Quote:
A better user experience (U/X) is to provide status notification on the
page (title, tooltip, changing text).
No; not "better"; merely "sometimes better" or "often better".

Quote:
When changing the status in an event (e.g. ` onmouseover `) you
should return true from the event. Also a number of browsers
require a short delay before setting the status to overcome their
default behaviour with the statusbar. `
onevent="setTimeout('window.status=\'Moomin\'',15) ;" `
Most browsers are configured, by default, to disallow scripts from setting
the status bar text.
AFAICS, IE allows, FF does not, Opera allows ; Safari & Chrome don't
have a bar. But I may have changed settings from default.

Mobile devices will probably be mostly status-bar free.
Certainly one cannot always assume that an end-user of a page will see a
status bar.

But an author/tester using a PC can be sure of having a status bar, by
choosing the browser that he is using to work on the internals of a
page. The bar is an available resource.


Quote:
The current answer only refers to after an event.
It does so because if called in an onmouseover, the status bar change
interferes with something the default action (behaviour).
Then it should be rewritten to remove the implication that the bar may
need special treatment for any event, as well as to indicate that it can
be used apart from events.

Quote:
But the bar can be
changed without any event, both my IE & my Opera show it changing on
running the page
script
J=88888
while(J--) window.status=J
/script
IE appears to show every number; Opera to show samples.

Quote:
Assume a page which calculates solidly for a whole two seconds, in
the
middle of which it calls the FAQ's
setTimeout('window.status=\'Moomin\'', 15);
Will that delay usually or always help? Should the delay be started
only when other action is about to stop, or at the start of a forced
pause?

Don't calculate for two seconds.
Unimportant : that was a gedankenexperiment, intended to elucidate the
underlying situation as you see it.

Quote:
Break the calculation into chunks. Use setTimeout to execute each
chunk until done. Display update notifications on the page, not in the
status bar.
That may be superfluous. I have often calculated for minutes, sometimes
hours. In a modern fast system. other processes remain sufficiently
responsive; there can be no need to pause the main job just to show that
it is still running and how well.



Please arrange that paragraph-separating lines are retained, or
replaced, when you quote consecutive paragraphs.

--
(c) John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v6.05 MIME.
Web <URL:http://www.merlyn.demon.co.uk/> - FAQish topics, acronyms, & links.
Proper <= 4-line sig. separator as above, a line exactly "-- " (SonOfRFC1036)
Do not Mail News to me. Before a reply, quote with ">" or "> " (SonOfRFC1036)

Reply With Quote
  #5  
Old   
Thomas 'PointedEars' Lahn
 
Posts: n/a

Default Re: FAQ Topic - I have window.status="Moomin"; why doesn't the statusbar change? (2009-11-04) - 11-05-2009 , 04:39 PM



Garrett Smith wrote:

Quote:
Dr J R Stockton wrote:
FAQ server posted:
-----------------------------------------------------------------------
FAQ Topic - I have window.status="Moomin"; why doesn't the
statusbar change?
-----------------------------------------------------------------------

There is no good reason for doing this.
There is; it can be done properly (so that pertinent information will still
be displayed).

Quote:
Can we remove this one?
IMHO yes, but only because it is not frequently asked anymore.


PointedEars
--
Anyone who slaps a 'this page is best viewed with Browser X' label on
a Web page appears to be yearning for the bad old days, before the Web,
when you had very little chance of reading a document written on another
computer, another word processor, or another network. -- Tim Berners-Lee

Reply With Quote
  #6  
Old   
Garrett Smith
 
Posts: n/a

Default Re: FAQ Topic - I have window.status="Moomin"; why doesn't the statusbarchange? (2009-11-04) - 11-05-2009 , 11:30 PM



Dr J R Stockton wrote:
Quote:
In comp.lang.javascript message <hcu27a$p7i$1 (AT) news (DOT) eternal-
september.org>, Thu, 5 Nov 2009 00:26:13, Garrett Smith
dhtmlkitchen (AT) gmail (DOT) com> posted:
Dr J R Stockton wrote:
In comp.lang.javascript message <4af0c409$0$278$14726298 (AT) news (DOT) sunsite.dk
, Wed, 4 Nov 2009 00:00:02, FAQ server <javascript (AT) dotinternet (DOT) be
posted:
-----------------------------------------------------------------------
FAQ Topic - I have window.status="Moomin"; why doesn't the
statusbar change?
-----------------------------------------------------------------------
There is no good reason for doing this.

Your experience is limited. Those with different experience can think
of reasons that you apparently cannot envisage.

Great. So fix that. Please demonstrate to us the practical utility of
window.status.

Quote:
Can we remove this one?

This is like an old, bad NS4 trick. Doesn't get asked and no sense
encouraging it.

If a status bar change is triggered by the user interacting with
something, it (the status bar) is usually very far from the actual thing
that the user is interacting with.

That is not the only way in which the bar can be changed. It can be
used as a continuous progress indicator, for example.

And remember that utility does not reside only in a finished, published
Web page; progress code can usefully be included during design-and-test
time and perhaps removed from the published version.

It can be a positive advantage that the status is being shown on a bar
at the foot; of late I have frequently had Opera doing a full scan with
URL:http://www.merlyn.demon.co.uk/linxchek>, taking about a minute,
with its progress/status bar peeping out from some completely different
task (like loading <http://www.bbc.co.uk/iplayer/episode/b00nky5d/Breakf
ast_Thursday_Sara_MohrPietsch/>). Status can matter and change even
when the page is not being (as far as it knows) interacted with.


A better user experience (U/X) is to provide status notification on the
page (title, tooltip, changing text).

No; not "better"; merely "sometimes better" or "often better".

You're an expert in HCI?

Quote:
When changing the status in an event (e.g. ` onmouseover `) you
should return true from the event. Also a number of browsers
require a short delay before setting the status to overcome their
default behaviour with the statusbar. `
onevent="setTimeout('window.status=\'Moomin\'',15) ;" `
Most browsers are configured, by default, to disallow scripts from setting
the status bar text.
AFAICS, IE allows, FF does not, Opera allows ; Safari & Chrome don't
have a bar. But I may have changed settings from default.

Mobile devices will probably be mostly status-bar free.

Certainly one cannot always assume that an end-user of a page will see a
status bar.

Where present, the status bar is often ignored by the user.

Quote:
But an author/tester using a PC can be sure of having a status bar, by
choosing the browser that he is using to work on the internals of a
page. The bar is an available resource.

The FAQ covers debugging tools, such as Firebug, IE developer toolbar,
Dragonfly (use opera.postError).

For environments where a debugging tool or console is unavailable, debug
info may be shown as text in an element (e.g. TEXTAREA, PRE).

Quote:
The current answer only refers to after an event.
It does so because if called in an onmouseover, the status bar change
interferes with something the default action (behaviour).

Then it should be rewritten to remove the implication that the bar may
need special treatment for any event, as well as to indicate that it can
be used apart from events.

It could be. Should it? Doesn't seem to be frequently asked.

Quote:
But the bar can be
changed without any event, both my IE & my Opera show it changing on
running the page
script
J=88888
while(J--) window.status=J
/script
IE appears to show every number; Opera to show samples.


Assume a page which calculates solidly for a whole two seconds, in
the
middle of which it calls the FAQ's
setTimeout('window.status=\'Moomin\'', 15);
Will that delay usually or always help? Should the delay be started
only when other action is about to stop, or at the start of a forced
pause?

Don't calculate for two seconds.

Unimportant : that was a gedankenexperiment, intended to elucidate the
underlying situation as you see it.

What is this? Is it some sort of game?

It took me a bit of time last night and think about the answer to your
(apparently fake) problem.

Quote:
Break the calculation into chunks. Use setTimeout to execute each
chunk until done. Display update notifications on the page, not in the
status bar.

That may be superfluous. I have often calculated for minutes, sometimes
hours. In a modern fast system. other processes remain sufficiently
responsive; there can be no need to pause the main job just to show that
it is still running and how well.

In a browser, halting and freezing for 2s is bad usability.

Quote:

Please arrange that paragraph-separating lines are retained, or
replaced, when you quote consecutive paragraphs.

I do not understand what this means.
--
Garrett
comp.lang.javascript FAQ: http://jibbering.com/faq/

Reply With Quote
  #7  
Old   
Justin C
 
Posts: n/a

Default Re: FAQ Topic - I have window.status="Moomin"; why doesn't the statusbar change? (2009-11-04) - 11-06-2009 , 07:57 AM



On 2009-11-06, Garrett Smith <dhtmlkitchen (AT) gmail (DOT) com> wrote:
Quote:
Dr J R Stockton wrote:
In comp.lang.javascript message <hcu27a$p7i$1 (AT) news (DOT) eternal-
september.org>, Thu, 5 Nov 2009 00:26:13, Garrett Smith
dhtmlkitchen (AT) gmail (DOT) com> posted:

Where present, the status bar is often ignored by the user.
Don't tar us all with the same brush with which you tar yourself.

Justin.

--
Justin C, by the sea.

Reply With Quote
  #8  
Old   
Dr J R Stockton
 
Posts: n/a

Default Re: FAQ Topic - I have window.status="Moomin"; why doesn't the statusbar change? (2009-11-04) - 11-07-2009 , 11:57 AM



In comp.lang.javascript message <hd08pq$r54$1 (AT) news (DOT) eternal-
september.org>, Thu, 5 Nov 2009 20:30:46, Garrett Smith
<dhtmlkitchen (AT) gmail (DOT) com> posted:
Quote:
Dr J R Stockton wrote:
In comp.lang.javascript message <hcu27a$p7i$1 (AT) news (DOT) eternal-
september.org>, Thu, 5 Nov 2009 00:26:13, Garrett Smith
dhtmlkitchen (AT) gmail (DOT) com> posted:
Dr J R Stockton wrote:
In comp.lang.javascript message <4af0c409$0$278$14726298 (AT) news (DOT) sunsite.dk
, Wed, 4 Nov 2009 00:00:02, FAQ server <javascript (AT) dotinternet (DOT) be
posted:
-----------------------------------------------------------------------
FAQ Topic - I have window.status="Moomin"; why doesn't the
statusbar change?
-----------------------------------------------------------------------
There is no good reason for doing this.
Your experience is limited. Those with different experience can
think
of reasons that you apparently cannot envisage.


Great. So fix that. Please demonstrate to us the practical utility of
window.status.
*Run* <URL:http://www.merlyn.demon.co.uk/linxchek.htm>, using a not-
very-fast browser on a not-very-fast machine, on a copy of a Web site
consisting of at least 100 pages redolent with links and anchors; and do
it at a time when you have something else useful to do on the machine
while eagerly awaiting the answer. Or believe one whose experience
extends where yours manifestly does not.


Quote:
A better user experience (U/X) is to provide status notification on
the
page (title, tooltip, changing text).
No; not "better"; merely "sometimes better" or "often better".


You're an expert in HCI?
Please trim your quotes, as the FAQ says; but retain paragraph
separation. I know enough about HCI to see that you do not understand
everything about what HCI implies in all possible situations, although
you may know what you have been taught.

And remember that presenting something in the status bar does not
preclude it being presented elsewhere, thereby giving the user a real
choice.


Quote:
When changing the status in an event (e.g. ` onmouseover `) you
should return true from the event. Also a number of browsers
require a short delay before setting the status to overcome their
default behaviour with the statusbar. `
onevent="setTimeout('window.status=\'Moomin\'',15) ;" `
Most browsers are configured, by default, to disallow scripts from setting
the status bar text.
AFAICS, IE allows, FF does not, Opera allows ; Safari & Chrome don't
have a bar. But I may have changed settings from default.

Mobile devices will probably be mostly status-bar free.
Certainly one cannot always assume that an end-user of a page will
see a
status bar.


Where present, the status bar is often ignored by the user.
Not the point. You have above "Most browsers are configured, by
default, to disallow scripts from setting the status bar text." Safari
& Chrome have no bar; IE & FF allow setting; only FF disallows. That's
not most, or even many.

And the status bar will not be ignored if the user knows that it will be
useful not to ignore it; and that, where applicable, is easily arranged.
Especially when the user is the author. Consider :

var bananas = true, J = 1e5, Status
// ...
while (--J>0) { Status = J
if (bananas) bananas = confirm("Status is " + Status +
"\nKeep interrupting me, rather than using the Status Bar?")
else window.status = Status
// lots more code
}


Quote:
But an author/tester using a PC can be sure of having a status bar, by
choosing the browser that he is using to work on the internals of a
page. The bar is an available resource.


The FAQ covers debugging tools, such as Firebug, IE developer toolbar,
Dragonfly (use opera.postError).
It does. But debugging tools are not a good way of providing a progress
indicator to an end user.


Quote:
For environments where a debugging tool or console is unavailable, debug
info may be shown as text in an element (e.g. TEXTAREA, PRE).
It can. But that's more effort, and occupies space within the window;
the status bar is already there and on the edge, which, as I have
explained before, can be useful.


Quote:
The current answer only refers to after an event.
It does so because if called in an onmouseover, the status bar change
interferes with something the default action (behaviour).
Then it should be rewritten to remove the implication that the bar
may
need special treatment for any event, as well as to indicate that it can
be used apart from events.

It could be. Should it? Doesn't seem to be frequently asked.
Most potential users will have been driven away by antagonistic
attitudes. However, where the FAQ does address a topic, it should
address that topic in as manifestly broad a manner as possible without
bloating the answer.

The FAQ currently has :
"When changing the status in an event (e.g. onmouseover) you should
return true from the event. Also a number of browsers require a short
delay before setting the status to overcome their default behaviour with
the statusbar."

This would be better, since it avoids the apparent limitation to event-
handling :

"Some browsers need a short delay before setting the status to overcome
their default behaviour with the statusbar. Also, when changing the
status in an event (e.g. onmouseover) you should return true from the
event."


I have not checked whether that advice about events is accurate. It
would be good to put the test code for all assertions in a parallel,
linked, document.


Quote:
But the bar can be
changed without any event, both my IE & my Opera show it changing on
running the page
script
J=88888
while(J--) window.status=J
/script
IE appears to show every number; Opera to show samples.

Assume a page which calculates solidly for a whole two seconds, in
the
middle of which it calls the FAQ's
setTimeout('window.status=\'Moomin\'', 15);
Will that delay usually or always help? Should the delay be started
only when other action is about to stop, or at the start of a forced
pause?

Don't calculate for two seconds.
Unimportant : that was a gedankenexperiment, intended to elucidate
the
underlying situation as you see it.


What is this? Is it some sort of game?

It took me a bit of time last night and think about the answer to your
(apparently fake) problem.
You were wrong in thinking that it was a problem. It was an
illustration. Typically, of course, the loop would include some other
use of variable J.

Quote:
Break the calculation into chunks. Use setTimeout to execute each
chunk until done. Display update notifications on the page, not in the
status bar.
That may be superfluous. I have often calculated for minutes,
sometimes
hours. In a modern fast system. other processes remain sufficiently
responsive; there can be no need to pause the main job just to show that
it is still running and how well.

In a browser, halting and freezing for 2s is bad usability.
That depends on the application. In technical work, as opposed to
sales, one commonly wants the task to run to completion without waste of
time. On a modern OS, that does not prevent other applications,
especially those needing only slower machines, from being responsive.
And, of course, if the status bar is showing change, the viewer knows
that the application is not frozen.

Don't regurgitate what is taught in the lower-class institutions;
consider it to be less likely to be sound than TL thinks DG is.

--
(c) John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v6.05 MIME.
Web <URL:http://www.merlyn.demon.co.uk/> - FAQish topics, acronyms, & links.
Proper <= 4-line sig. separator as above, a line exactly "-- " (SonOfRFC1036)
Do not Mail News to me. Before a reply, quote with ">" or "> " (SonOfRFC1036)

Reply With Quote
  #9  
Old   
Garrett Smith
 
Posts: n/a

Default Re: FAQ Topic - I have window.status="Moomin"; why doesn't the statusbarchange? (2009-11-04) - 11-10-2009 , 03:45 AM



Dr J R Stockton wrote:
Quote:
In comp.lang.javascript message <hd08pq$r54$1 (AT) news (DOT) eternal-
september.org>, Thu, 5 Nov 2009 20:30:46, Garrett Smith
dhtmlkitchen (AT) gmail (DOT) com> posted:
Dr J R Stockton wrote:
In comp.lang.javascript message <hcu27a$p7i$1 (AT) news (DOT) eternal-
september.org>, Thu, 5 Nov 2009 00:26:13, Garrett Smith
dhtmlkitchen (AT) gmail (DOT) com> posted:
Dr J R Stockton wrote:
In comp.lang.javascript message <4af0c409$0$278$14726298 (AT) news (DOT) sunsite.dk
, Wed, 4 Nov 2009 00:00:02, FAQ server <javascript (AT) dotinternet (DOT) be
posted:
-----------------------------------------------------------------------
FAQ Topic - I have window.status="Moomin"; why doesn't the
statusbar change?
-----------------------------------------------------------------------
There is no good reason for doing this.
Your experience is limited. Those with different experience can
think
of reasons that you apparently cannot envisage.

Great. So fix that. Please demonstrate to us the practical utility of
window.status.

*Run* <URL:http://www.merlyn.demon.co.uk/linxchek.htm>, using a not-
very-fast browser on a not-very-fast machine, on a copy of a Web site
consisting of at least 100 pages redolent with links and anchors; and do
it at a time when you have something else useful to do on the machine
while eagerly awaiting the answer. Or believe one whose experience
extends where yours manifestly does not.


I loaded a page that looks like any other of your web pages. Long.
Yellow background, a lot of text, boxes with buttons.

There is a section Heading with the word "Operation"

That section has no text.

Now I see: NOT WORKABLE FROM WEB.

I am not interested in figuring out whatever it is you want me to
download. Can you provide a simple example on-line?

[...]

Quote:
Where present, the status bar is often ignored by the user.

Not the point. You have above "Most browsers are configured, by
default, to disallow scripts from setting the status bar text." Safari
& Chrome have no bar; IE & FF allow setting; only FF disallows. That's
not most, or even many.
Removing the entry would fix that.

Quote:
And the status bar will not be ignored if the user knows that it will be
useful not to ignore it; and that, where applicable, is easily arranged.
Especially when the user is the author. Consider :

var bananas = true, J = 1e5, Status
// ...
while (--J>0) { Status = J
if (bananas) bananas = confirm("Status is " + Status +
"\nKeep interrupting me, rather than using the Status Bar?")
else window.status = Status
// lots more code
}

Modifying the status is not as obnoxious as setting 100000 prompts. That
example substitues a bad U/X for a worse one.

Quote:
But an author/tester using a PC can be sure of having a status bar, by
choosing the browser that he is using to work on the internals of a
page. The bar is an available resource.

The FAQ covers debugging tools, such as Firebug, IE developer toolbar,
Dragonfly (use opera.postError).

It does. But debugging tools are not a good way of providing a progress
indicator to an end user.


The end user? You were arguing for "an author/tester using a PC".

Quote:
For environments where a debugging tool or console is unavailable, debug
info may be shown as text in an element (e.g. TEXTAREA, PRE).

It can. But that's more effort, and occupies space within the window;
the status bar is already there and on the edge, which, as I have
explained before, can be useful.

That works in a few browsers.


[...]

Quote:
"Some browsers need a short delay before setting the status to overcome
their default behaviour with the statusbar. Also, when changing the
status in an event (e.g. onmouseover) you should return true from the
event."


I have not checked whether that advice about events is accurate. It
would be good to put the test code for all assertions in a parallel,
linked, document.


Great idea.
Functional examples are really helpful for learning and are examples of
how to write an example.


[...]

Quote:
What is this? Is it some sort of game?

It took me a bit of time last night and think about the answer to your
(apparently fake) problem.

You were wrong in thinking that it was a problem. It was an
illustration. Typically, of course, the loop would include some other
use of variable J.
I see.

Quote:
Break the calculation into chunks. Use setTimeout to execute each
chunk until done. Display update notifications on the page, not in the
status bar.
That may be superfluous. I have often calculated for minutes,
sometimes
hours. In a modern fast system. other processes remain sufficiently
responsive; there can be no need to pause the main job just to show that
it is still running and how well.
In a browser, halting and freezing for 2s is bad usability.

That depends on the application. In technical work, as opposed to
sales, one commonly wants the task to run to completion without waste of
time. On a modern OS, that does not prevent other applications,
especially those needing only slower machines, from being responsive.
And, of course, if the status bar is showing change, the viewer knows
that the application is not frozen.

No, that is not true.

The user doees not see the status bar in many cases, and so when the
browser is frozen in 10k iterations, it's end-task or force quit.

Quote:
Don't regurgitate what is taught in the lower-class institutions;
consider it to be less likely to be sound than TL thinks DG is.

I could care less which schools you attended.

The entry will be removed.
--
Garrett
comp.lang.javascript FAQ: http://jibbering.com/faq/

Reply With Quote
  #10  
Old   
Dr J R Stockton
 
Posts: n/a

Default Re: FAQ Topic - I have window.status="Moomin"; why doesn't the statusbar change? (2009-11-04) - 11-10-2009 , 07:51 PM



In comp.lang.javascript message <hdb977$r3r$1 (AT) news (DOT) eternal-
september.org>, Tue, 10 Nov 2009 00:45:25, Garrett Smith
<dhtmlkitchen (AT) gmail (DOT) com> posted:
Quote:
Dr J R Stockton wrote:
In comp.lang.javascript message <hd08pq$r54$1 (AT) news (DOT) eternal-
september.org>, Thu, 5 Nov 2009 20:30:46, Garrett Smith
dhtmlkitchen (AT) gmail (DOT) com> posted:
Dr J R Stockton wrote:
In comp.lang.javascript message <hcu27a$p7i$1 (AT) news (DOT) eternal-
september.org>, Thu, 5 Nov 2009 00:26:13, Garrett Smith
dhtmlkitchen (AT) gmail (DOT) com> posted:
Dr J R Stockton wrote:
In comp.lang.javascript message <4af0c409$0$278$14726298 (AT) news (DOT) sunsite.dk
, Wed, 4 Nov 2009 00:00:02, FAQ server <javascript (AT) dotinternet (DOT) be
posted:
-----------------------------------------------------------------------
FAQ Topic - I have window.status="Moomin"; why doesn't the
statusbar change?
-----------------------------------------------------------------------
There is no good reason for doing this.
Your experience is limited. Those with different experience can
think
of reasons that you apparently cannot envisage.

Great. So fix that. Please demonstrate to us the practical utility of
window.status.
*Run* <URL:http://www.merlyn.demon.co.uk/linxchek.htm>, using a not-
very-fast browser on a not-very-fast machine, on a copy of a Web site
consisting of at least 100 pages redolent with links and anchors; and do
it at a time when you have something else useful to do on the machine
while eagerly awaiting the answer. Or believe one whose experience
extends where yours manifestly does not.

I loaded a page that looks like any other of your web pages. Long.
Yellow background, a lot of text, boxes with buttons.

There is a section Heading with the word "Operation"

That section has no text.
It contains sub-sections which do, though.


Quote:
Now I see: NOT WORKABLE FROM WEB.

I am not interested in figuring out whatever it is you want me to
download. Can you provide a simple example on-line?
Not tonight. But if you had read all of that little box, you would have
seen "This page requires _include1.js_ and wants _styles-a.css_.
NOT WORKABLE FROM WEB. Use a local copy.", with links as indicated.

You should not expect a simple and convincing example, since the essence
of the situation is that it is for code which does a lot.




But try <URL:http://www.merlyn.demon.co.uk/estr-bcp.htm#JS>, second
blue form, containing "From : To : [Long Test]", with "To" set to
5700000 (the repeat interval). In my IE, the box under "Clear" does not
change during the test (unless there is an error), but the status bar
does. In my Opera, both change.

Using window.status (choosing a browser that does it) is far easier to
program, and the progress can be seen with just a corner of the window
showing. Moreover, it does not delay progress by imposing timeouts.



Quote:
[...]

Where present, the status bar is often ignored by the user.
Not the point. You have above "Most browsers are configured, by
default, to disallow scripts from setting the status bar text." Safari
& Chrome have no bar; IE & FF allow setting; only FF disallows. That's
not most, or even many.

Removing the entry would fix that.
Unhelpfully.

Quote:
And the status bar will not be ignored if the user knows that it
will be
useful not to ignore it; and that, where applicable, is easily arranged.
Especially when the user is the author. Consider :
var bananas = true, J = 1e5, Status
// ...
while (--J>0) { Status = J
if (bananas) bananas = confirm("Status is " + Status +
"\nKeep interrupting me, rather than using the Status Bar?")
else window.status = Status
// lots more code
}


Modifying the status is not as obnoxious as setting 100000 prompts. That
example substitues a bad U/X for a worse one.
The intelligent user would confirm no more than once or twice.


Quote:
But an author/tester using a PC can be sure of having a status bar,
by
choosing the browser that he is using to work on the internals of a
page. The bar is an available resource.

The FAQ covers debugging tools, such as Firebug, IE developer toolbar,
Dragonfly (use opera.postError).
It does. But debugging tools are not a good way of providing a
progress
indicator to an end user.


The end user? You were arguing for "an author/tester using a PC".
It is necessary to consider both. Without an author, there can be no
end user; but every author hopes for end users.


Quote:
For environments where a debugging tool or console is unavailable, debug
info may be shown as text in an element (e.g. TEXTAREA, PRE).
It can. But that's more effort, and occupies space within the
window;
the status bar is already there and on the edge, which, as I have
explained before, can be useful.


That works in a few browsers.
And if one has several browsers, one can choose a browser in which it
works.


Quote:
[...]

"Some browsers need a short delay before setting the status to overcome
their default behaviour with the statusbar. Also, when changing the
status in an event (e.g. onmouseover) you should return true from the
event."
I have not checked whether that advice about events is accurate.
It
would be good to put the test code for all assertions in a parallel,
linked, document.



Great idea.
Functional examples are really helpful for learning and are examples of
how to write an example.


[...]

What is this? Is it some sort of game?

It took me a bit of time last night and think about the answer to your
(apparently fake) problem.
You were wrong in thinking that it was a problem. It was an
illustration. Typically, of course, the loop would include some other
use of variable J.

I see.


Break the calculation into chunks. Use setTimeout to execute each
chunk until done. Display update notifications on the page, not in the
status bar.
That may be superfluous. I have often calculated for minutes,
sometimes
hours. In a modern fast system. other processes remain sufficiently
responsive; there can be no need to pause the main job just to show that
it is still running and how well.
In a browser, halting and freezing for 2s is bad usability.
That depends on the application. In technical work, as opposed to
sales, one commonly wants the task to run to completion without waste of
time. On a modern OS, that does not prevent other applications,
especially those needing only slower machines, from being responsive.
And, of course, if the status bar is showing change, the viewer knows
that the application is not frozen.


No, that is not true.

The user doees not see the status bar in many cases, and so when the
browser is frozen in 10k iterations, it's end-task or force quit.
The author does need to choose a number of iterations such that the bar
is updated about once in every 0.2 to 2.0 seconds. And the author can,
as in the example linked above, mention the status bar.


Quote:
Don't regurgitate what is taught in the lower-class institutions;
consider it to be less likely to be sound than TL thinks DG is.

I could care less which schools you attended.
Unfortunately, it is wisdom on your part which we need in order to have
a good FAQ.

Quote:
The entry will be removed.
And lack.

Would it not be smarter for you to write a new section which describes,
in sufficient detail for the intended FAQ readership, how progress
should (in your limited view) actually be indicated during a long
operation, giving due consideration to the differences between browsers?
You might say, for example, something about opening a small child window
to remain visible and show progress.when the main window is minimised.

--
(c) John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v6.05 MIME.
Web <URL:http://www.merlyn.demon.co.uk/> - FAQish topics, acronyms, & links.
Proper <= 4-line sig. separator as above, a line exactly "-- " (SonOfRFC1036)
Do not Mail News to me. Before a reply, quote with ">" or "> " (SonOfRFC1036)

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.