window.status fails Firefox

M

Mark

There are no problems with the following image loading code fragment
and window.status assigments/updates in IE but in Firefox window.status
fails to update. Any suggestions?

(function imageLoader() {
for (i=0; i <= 358; i+=2) {
imgSRC = 'cue'+i+'.gif';
cues = new Image();
cues.cnt = 0;
cues.onload = imagesToLoad(i);
cues.onerror = createErrorHandler(imgSRC);
cues.src = imgSRC;
}
})();

function imagesToLoad(i) {
return function () {
if ((i += 2) <= 358) window.status = (179 - (i>>1)) + ' images left
to load.';
else window.status = 'image loading completed.';
}
}

function createErrorHandler(imgSRC) {
return function () {
this.src = (this.cnt++ < 3)? imgSRC : 'missing.gif';
}
}
 
H

Hywel Jenkins

There are no problems with the following image loading code fragment
and window.status assigments/updates in IE but in Firefox window.status
fails to update. Any suggestions?

Check that your JavaScript settings in Firefox permit updating the
status bar text.
 
M

Mark

Is the window.status bar text update normally "turned off" in
Firefox/Mozilla and if so is this because of some security issue? Also,
can this setting be either checked for or barring security issues can
it be "turned on" from Javascript?
 
D

DU

Mark said:
There are no problems with the following image loading code fragment
and window.status assigments/updates in IE but in Firefox window.status
fails to update. Any suggestions?

(function imageLoader() {
for (i=0; i <= 358; i+=2) {
imgSRC = 'cue'+i+'.gif';
cues = new Image();
cues.cnt = 0;
cues.onload = imagesToLoad(i);
cues.onerror = createErrorHandler(imgSRC);
cues.src = imgSRC;
}
})();

function imagesToLoad(i) {
return function () {
if ((i += 2) <= 358) window.status = (179 - (i>>1)) + ' images left
to load.';
else window.status = 'image loading completed.';


No return true after setting the window.status string. In any case, a
large majority of Firefox, Mozilla, Gecko-based browser and Opera users
turn off status bar string editing by web authors. There is very little
justification for spamming or intrusing or text-editing in any way on
such toolbar.

DU
 
R

Randy Webb

Mark said:
Is the window.status bar text update normally "turned off" in
Firefox/Mozilla and if so is this because of some security issue?

Yes. Its because website authors kept hijacking it to put obnoxious
useless messages in it.

Also, can this setting be either checked for or barring security
issues can it be "turned on" from Javascript?


Its in the documentation right after the section about "How to open a
new window when a popup blocker is being used". The answer is no. Its
disabled, the user wants it that way, leave it alone.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq
Answer:It destroys the order of the conversation
Question: Why?
Answer: Top-Posting.
Question: Whats the most annoying thing on Usenet?
 
M

Mark

OK Randy. It can't be "turned on" or checked from JS, it can be used
for obnoxious messages and it's not a security issue but rather an
insecurity issue ... at least with some ;-)
 
R

Randy Webb

Mark said:
OK Randy. It can't be "turned on" or checked from JS,

You can attempt to set the window.status property and reading it back,
but that won't tell you if it visibly changed or not, only that you
changed its value. The difference is whether it actually changed whats
displayed on the status bar.
it can be used for obnoxious messages

And that is why you can't script it anymore.
and it's not a security issue but rather an
insecurity issue ... at least with some ;-)

Oh, an insecurity issue on the programmers part? I can understand and
agree with that.

What tidbit of information do you have that is so important that its
more important than the basic functionality of the status bar, and, that
can't be displayed in the page itself if its *that* important?
 
M

Mark

Randy, in this thread it is not about what's important to you since
that is irrelevant. Instead, it is about what's important to me.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,053
Latest member
BrodieSola

Latest Threads

Top