window.status fails Firefox

Discussion in 'Javascript' started by Mark, Dec 26, 2004.

  1. Mark

    Mark Guest

    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';
    }
    }
     
    Mark, Dec 26, 2004
    #1
    1. Advertising

  2. In article <>,
    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.
     
    Hywel Jenkins, Dec 26, 2004
    #2
    1. Advertising

  3. Mark

    Mark Guest

    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?
     
    Mark, Dec 27, 2004
    #3
  4. Mark

    DU Guest

    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 = 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
    --
    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';
    > }
    > }
    >
     
    DU, Dec 27, 2004
    #4
  5. Mark

    Randy Webb Guest

    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?
     
    Randy Webb, Dec 27, 2004
    #5
  6. Mark

    Mark Guest

    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 ;-)
     
    Mark, Dec 27, 2004
    #6
  7. Mark

    Randy Webb Guest

    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
     
    Randy Webb, Dec 27, 2004
    #7
  8. Mark

    Mark Guest

    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.
     
    Mark, Dec 27, 2004
    #8
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. saha
    Replies:
    0
    Views:
    4,140
  2. Shug
    Replies:
    13
    Views:
    922
    Philipp
    Dec 15, 2006
  3. Replies:
    2
    Views:
    318
    Grant Wagner
    Dec 23, 2004
  4. topmind
    Replies:
    1
    Views:
    358
    Bart Van der Donck
    Jul 1, 2006
  5. Ronen Yacov
    Replies:
    1
    Views:
    250
    David Dorward
    Nov 5, 2007
Loading...

Share This Page