Writing to the status bar

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • RobertTheProgrammer
    New Member
    • Aug 2007
    • 58

    Writing to the status bar

    Hi folks,

    This should be trivial, but I'm relatively new to web programming...

    I'm using Javascript to write to the IE6 status bar with the rather straightforward script:

    Code:
    <script>
        window.status="this is the status bar!";
    </script>
    My problem is that every time I load the page, my message displays for only a second or two and this "Done" is displayed. How can I get my message to stick on the status bar?

    Robert
  • hsriat
    Recognized Expert Top Contributor
    • Jan 2008
    • 1653

    #2
    Try this...[HTML]<body onload="window. status='this is the status bar!';">[/HTML]

    window.status is a non standard thing, so I am not sure if it would work.

    Comment

    • acoder
      Recognized Expert MVP
      • Nov 2006
      • 16032

      #3
      Note that not all browsers let you set the status bar message. In Firefox, this is disabled by default.

      Comment

      • RobertTheProgrammer
        New Member
        • Aug 2007
        • 58

        #4
        Hello,

        Thanks, but the onload event only sets the status bar on the load. I need to set it dynamically via javascript, depending upon user actions. I can do this, but the last thing IE is doing is putting "Done" on the status bar, overwriting whatever I've put there with my code. So your suggestion doesn't really solve my problem. (But thanks anyway!)

        As for FireFox... It's not a big deal, really. This is for a website only to be used internally by my company, and our IT group only supports IE6. (Sucks, I know, but it is what it is.)

        BTW, I should add that I'm using ASP.NET to develop this application. I don't know if that could be a factor.

        Robert

        Comment

        • RobertTheProgrammer
          New Member
          • Aug 2007
          • 58

          #5
          Ah! I solved my own problem (I think).

          Rather than setting the "window.default " value, I set the "window.default Status" value. I'm not so sure what the repercussions are of setting the default status message, though, so we shall see.

          I never did figure out where the "Done" was coming from. Several sources seemed to indicate it was Google Toolbar, which I have installed. I uninstalled it, but the problem of the "Done" persisted.

          Thanks for reading and thanks for the help.

          Robert

          Comment

          • acoder
            Recognized Expert MVP
            • Nov 2006
            • 16032

            #6
            It may be that return true is required. The following example should work:
            [html]<div onmouseover="wi ndow.status='Mo used over'; return true;" onmouseout="win dow.status='Mou sed out'; return true;">Some text</div>[/html]

            Comment

            Working...