I'm trying to get the status bar to display a custom message instead of the default thing when I mouseover an element but for some reason it keeps displaying the default message.
What am I doing wrong?

    $insertpics .= "    <td align=\"center\"><a onmouseover=\"window.status='Open Picture';\" onmousout=\"window.status=''; return;\" href=\"javascript:opener('$dirName/$jpgFile', $jpgWidth, $jpgHeight)\">\r      <img style='border-color:#8888aa; border-width:1px; border-style:solid;' src='$dirName/$gifFile'></a></td>\r";

(and of course, it is displaying $insterpics later in the page)

    It should work as is...what browser are you using? You may have that feature turned off on your browser.

      I'm using IE 7.0 Beta... I wonder if it doesn't support that yet....
      I'll try another browser and check.

        Ok, I'm not sure if any of these will work, but first, try returning true on the onmouseover event. If that still doesn't work, try using onMouseover with the capital M. Those are the only things I can think of.

        EDIT: I just checked, and you have to return true. Change your code to this:

         $insertpics .= "    <td align=\"center\"><a onmouseover=\"window.status='Open Picture'; return true;\" onmousout=\"window.status=''; return true;\" href=\"javascript:opener('$dirName/$jpgFile', $jpgWidth, $jpgHeight)\">\r      <img style='border-color:#8888aa; border-width:1px; border-style:solid;' src='$dirName/$gifFile'></a></td>\r";

          still didn't work in either IE7 beta or Firefox.... and I know... it should work!

            5 days later

            That works for me in Firefox. Are you sure you have Change Statusbar Text enabled under JavaScript options under content options?

              That's what it was... thanks.
              Does IE and FF come preloaded with that feature turned off? If it does, I might as well do away with the whole feature on my site.

              Thanks for the help Merve and FatalError. Sorry I didn't check it right away. :o

                I think in Firefox it has been turned off by default for security reasons (phishing prevention).

                You might as well do away with it; the status bar is for browser status messages. Why not use a title= attribute instead?
                <a href="..." title="Open Picture">

                  I wanted to change the status bar because my href is kind of a nasty looking thing like this:
                  javascript:opener('pics/4.jpg', 300, 221)
                  and I would rather have something nice and clean like: 'Open Picture'

                  Is there an easy way to have the title appear immediately, instead after the normal delay?

                    Write a Reply...