window.status fails Firefox

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Mark

    #1

    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 = createErrorHand ler(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 createErrorHand ler(imgSRC) {
    return function () {
    this.src = (this.cnt++ < 3)? imgSRC : 'missing.gif';
    }
    }

  • Hywel Jenkins

    #2
    Re: window.status fails Firefox

    In article <1104044145.919 373.275570@z14g 2000cwz.googleg roups.com>,
    mszlazak@aol.co m says...[color=blue]
    > 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?[/color]

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

    --
    Hywel http://kibo.org.uk/
    I do not eat quiche.

    Comment

    • Mark

      #3
      Re: window.status fails Firefox

      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?

      Comment

      • DU

        #4
        Re: window.status fails Firefox

        Mark wrote:
        [color=blue]
        > 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 = createErrorHand ler(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.';[/color]

        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 :)
        [color=blue]
        > }
        > }
        >
        > function createErrorHand ler(imgSRC) {
        > return function () {
        > this.src = (this.cnt++ < 3)? imgSRC : 'missing.gif';
        > }
        > }
        >[/color]


        Comment

        • Randy Webb

          #5
          Re: window.status fails Firefox

          Mark wrote:[color=blue]
          > Is the window.status bar text update normally "turned off" in
          > Firefox/Mozilla and if so is this because of some security issue?[/color]

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

          [color=blue]
          > Also, can this setting be either checked for or barring security
          > issues can it be "turned on" from Javascript?[/color]


          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.javas cript 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?

          Comment

          • Mark

            #6
            Re: window.status fails Firefox

            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 ;-)

            Comment

            • Randy Webb

              #7
              Re: window.status fails Firefox

              Mark wrote:[color=blue]
              > OK Randy. It can't be "turned on" or checked from JS,[/color]

              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.
              [color=blue]
              > it can be used for obnoxious messages[/color]

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

              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.javas cript FAQ - http://jibbering.com/faq

              Comment

              • Mark

                #8
                Re: window.status fails Firefox

                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.

                Comment

                • Andrew Thompson

                  #9
                  Re: window.status fails Firefox

                  On 26 Dec 2004 20:25:18 -0800, Mark wrote:
                  [color=blue]
                  > 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.[/color]

                  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

                  Comment

                  Working...