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

window.status fails Firefox

P: n/a
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
Share this Question
Share on Google+
8 Replies


P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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.