471,595 Members | 1,667 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,595 software developers and data experts.

window.status fails Firefox

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[i] = new Image();
cues[i].cnt = 0;
cues[i].onload = imagesToLoad(i);
cues[i].onerror = createErrorHandler(imgSRC);
cues[i].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';
}
}

Jul 23 '05 #1
8 7870
In article <11**********************@z14g2000cwz.googlegroups .com>,
ms******@aol.com says...
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.

--
Hywel http://kibo.org.uk/
I do not eat quiche.
Jul 23 '05 #2
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?

Jul 23 '05 #3
DU
Mark wrote:
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[i] = new Image();
cues[i].cnt = 0;
cues[i].onload = imagesToLoad(i);
cues[i].onerror = createErrorHandler(imgSRC);
cues[i].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
--
The site said to use Internet Explorer 5 or better... so I switched to
Mozilla 1.7.5 :)
}
}

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

Jul 23 '05 #4
Mark wrote:
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?
Jul 23 '05 #5
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 ;-)

Jul 23 '05 #6
Mark wrote:
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?

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq
Jul 23 '05 #7
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.

Jul 23 '05 #8
On 26 Dec 2004 20:25:18 -0800, Mark wrote:
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.


LOL! Where does the visitor come into your equation?

--
Andrew Thompson
http://www.PhySci.org/codes/ Web & IT Help
http://www.PhySci.org/ Open-source software suite
http://www.1point1C.org/ Science & Technology
http://www.LensEscapes.com/ Images that escape the mundane
Jul 23 '05 #9

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

18 posts views Thread by Andrew Poulos | last post: by
8 posts views Thread by Dominic Tocci | last post: by
14 posts views Thread by D. Alvarado | last post: by
4 posts views Thread by Csaba Gabor | last post: by
19 posts views Thread by Frances | last post: by
2 posts views Thread by Xerxes | last post: by
4 posts views Thread by arajunk | last post: by
reply views Thread by XIAOLAOHU | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.