Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > window.status fails Firefox

Reply
Thread Tools

window.status fails Firefox

 
 
Mark
Guest
Posts: n/a
 
      12-26-2004
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) <= 35 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';
}
}

 
Reply With Quote
 
 
 
 
Hywel Jenkins
Guest
Posts: n/a
 
      12-26-2004
In article < .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.
 
Reply With Quote
 
 
 
 
Mark
Guest
Posts: n/a
 
      12-27-2004
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?

 
Reply With Quote
 
DU
Guest
Posts: n/a
 
      12-27-2004
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) <= 35 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';
> }
> }
>



 
Reply With Quote
 
Randy Webb
Guest
Posts: n/a
 
      12-27-2004
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?
 
Reply With Quote
 
Mark
Guest
Posts: n/a
 
      12-27-2004
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

 
Reply With Quote
 
Randy Webb
Guest
Posts: n/a
 
      12-27-2004
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
 
Reply With Quote
 
Mark
Guest
Posts: n/a
 
      12-27-2004
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.

 
Reply With Quote
 
 
 
Reply

Thread Tools

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Constant.t fails 240 of 272 tests and recurs.t fails 1 of 25 tests on HPUX using perl 5.8.7 dayo Perl Misc 11 12-16-2005 09:09 PM
Firefox [windows] installation fails boywonder Firefox 2 11-10-2005 02:00 AM
Firefox 1.0 -- Adding Bookmarks Fails Dennis J. Tuchler Firefox 6 02-27-2005 10:25 PM
slideshow fails, Firefox debugger also fails lkrubner@geocities.com Javascript 2 12-23-2004 06:22 PM
Forms Authentication Fails Between ASP.NET 1.0 and 1.1 Applications (Cookie Decryption Fails) John Saunders ASP .Net 1 11-18-2003 03:25 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57