Can't change window.status message - help!

Discussion in 'HTML' started by mark4asp, Sep 15, 2003.

  1. mark4asp

    mark4asp Guest

    Why won't the window.status message change ?

    IE ver. 6.0.2800.1106 displays the tooltip OK.

    <td>
    <A HREF="editAuthor.asp?item=4"
    title="Edit author details"
    onMouseOver="window.status=this.title"
    onMouseOut="window.status=''">Micky Mouse</A>
    </td>

    Similar code works when the title and events are associated with <TD>
    tags rather than <A> tags.
     
    mark4asp, Sep 15, 2003
    #1
    1. Advertising

  2. mark4asp

    mark4asp Guest

    On Mon, 15 Sep 2003 14:28:09 +0300, "Janne Raiskila" <>
    wrote:

    >If you have many links on your page i'd prefer this:
    >
    >place between <head> and </head>:
    >
    ><script language=javascript>
    >window.defaultStatus="";
    ></script>
    >
    >and the link:
    >
    ><a href="editAuthor.asp?item=4" title="Edit author details"
    >onMouseOver="window.status=this.title; return true;">Mickey Mouse</a>
    >
    >
    >if you have only couple of links, you can do it this way also:
    >
    ><a href="editAuthor.asp?item=4" title="Edit author details"
    >onMouseOver="window.status=this.title; return true;"
    >onMouseOut="window.status=' '; return true;">Mickey Mouse</a>


    Thanks.

    I can see my error now. I wasn't properly invoking the javascript.

    <head>
    <script language="JavaScript">
    <!--
    function statusMsg(msg) {
    window.status=msg;
    return true
    }
    //-->
    </script>
    </head>

    ....

    <td>
    <A HREF="editAuthor.asp?item=4"
    title="Edit author details"
    onMouseOver="return statusMsg(this.title)"
    onMouseOut="return statusMsg('')">Micky Mouse</A>
    </td>

    Although I believe it makes no difference wheher the javascript is
    places between the <head></head> or <body></body> tags, or so I've
    been told.
     
    mark4asp, Sep 15, 2003
    #2
    1. Advertising

  3. mark4asp

    rf Guest

    "mark4asp" <mark4asp#killspam#@ntlworld.com> wrote in message
    news:...
    > Why won't the window.status message change ?
    >
    > IE ver. 6.0.2800.1106 displays the tooltip OK.
    >
    > <td>
    > <A HREF="editAuthor.asp?item=4"
    > title="Edit author details"
    > onMouseOver="window.status=this.title"
    > onMouseOut="window.status=''">Micky Mouse</A>
    > </td>
    >
    > Similar code works when the title and events are associated with <TD>
    > tags rather than <A> tags.


    The status bar is there for the user to see which URL a link points to, not
    for you to manipulate. Leave it all alone and all will be OK :)

    Cheers
    Richard.
     
    rf, Sep 15, 2003
    #3
  4. If you have many links on your page i'd prefer this:

    place between <head> and </head>:

    <script language=javascript>
    window.defaultStatus="";
    </script>

    and the link:

    <a href="editAuthor.asp?item=4" title="Edit author details"
    onMouseOver="window.status=this.title; return true;">Mickey Mouse</a>


    if you have only couple of links, you can do it this way also:

    <a href="editAuthor.asp?item=4" title="Edit author details"
    onMouseOver="window.status=this.title; return true;"
    onMouseOut="window.status=' '; return true;">Mickey Mouse</a>


    --
    Janne
    http://trax.to/thx/


    "mark4asp" <mark4asp#killspam#@ntlworld.com> wrote in
    news:...
    > Why won't the window.status message change ?
    >
    > IE ver. 6.0.2800.1106 displays the tooltip OK.
    >
    > <td>
    > <A HREF="editAuthor.asp?item=4"
    > title="Edit author details"
    > onMouseOver="window.status=this.title"
    > onMouseOut="window.status=''">Micky Mouse</A>
    > </td>
    >
    > Similar code works when the title and events are associated with <TD>
    > tags rather than <A> tags.
    >
     
    Janne Raiskila, Sep 15, 2003
    #4

  5. > The status bar is there for the user to see which URL a link points to,

    not
    > for you to manipulate. Leave it all alone and all will be OK :)
    >
    > Cheers
    > Richard.
    >
    >


    The status bar is there to show status messages. If your application has a
    more useful status message than a (not very useful) URL, then why not
    program the status bar to show a useful message?

    Regards,

    Pete.
     
    Peter Connolly, Sep 18, 2003
    #5
  6. mark4asp

    rf Guest

    "Peter Connolly" <> wrote in message
    news:bkc151$cr2$1$...
    >
    > > The status bar is there for the user to see which URL a link points to,

    > not
    > > for you to manipulate. Leave it all alone and all will be OK :)


    > The status bar is there to show status messages. If your application has a
    > more useful status message than a (not very useful) URL, then why not
    > program the status bar to show a useful message?


    IMHO the status bar is there to show status messages *from the browser*, not
    from the web page author. A web page is not the application, the browser is
    the application. The web page is the data.

    This has been thrashed about endlessly in the newsgroups. The general
    consensus is that, when viewers hover over a link they sometimes look at the
    status bar to see where the link is going to send them to. If something
    other than a URL appears then they get suspicious and just don't go there.
    The exception is of course those XXX sites :)

    Cheers
    Richard.
     
    rf, Sep 18, 2003
    #6
  7. Hi,

    rf wrote:

    > "Peter Connolly" <> wrote in message
    > news:bkc151$cr2$1$...
    >
    >>>The status bar is there for the user to see which URL a link points to,

    >>
    >>not
    >>
    >>>for you to manipulate. Leave it all alone and all will be OK :)

    >
    >
    >>The status bar is there to show status messages. If your application has a
    >>more useful status message than a (not very useful) URL, then why not
    >>program the status bar to show a useful message?

    >
    >
    > IMHO the status bar is there to show status messages *from the browser*, not
    > from the web page author. A web page is not the application, the browser is
    > the application. The web page is the data.
    >
    > This has been thrashed about endlessly in the newsgroups. The general
    > consensus is that, when viewers hover over a link they sometimes look at the
    > status bar to see where the link is going to send them to. If something
    > other than a URL appears then they get suspicious and just don't go there.
    > The exception is of course those XXX sites :)
    >
    > Cheers
    > Richard.


    While I understand that the general consensus amongst webdesigner is
    what you state, I disagree in some cases.

    The status bar is there to give information. Actually, the browser is
    more than an application, it's a platform. Nowadays, full-blown
    applications can be implemented in JavaScript, and the status bar can be
    very handy, for example to inform the user about the progress of a long
    process. It's easy to use, and you should not let your user sit and wait
    without any information.

    I agree that for links, the status bar should preferably display the
    URL. But the status bar can be used for a lot more than just that.

    Laurent
    --
    Laurent Bugnion, GalaSoft
    Webdesign, Java, JavaScript: http://www.galasoft-LB.ch
    Private/Malaysia: http://mypage.bluewin.ch/lbugnion
    Support children in Calcutta: http://www.calcutta-espoir.ch
     
    Laurent Bugnion, GalaSoft, Sep 18, 2003
    #7
  8. "Laurent Bugnion, GalaSoft" <galasoft-LB@bluewin_NO_SPAM.ch> wrote in
    message news:bkc2oa$69r$-plus.net...
    >
    > The status bar is there to give information. Actually, the browser is
    > more than an application, it's a platform. Nowadays, full-blown
    > applications can be implemented in JavaScript, and the status bar can be
    > very handy, for example to inform the user about the progress of a long
    > process. It's easy to use, and you should not let your user sit and wait
    > without any information.
    >


    So why not put the information somewhere actually on the page, where it
    belongs ?

    --
    Richard
     
    Richard Rundle, Sep 18, 2003
    #8
  9. mark4asp

    Randy Webb Guest

    mark4asp wrote:
    > On Mon, 15 Sep 2003 14:28:09 +0300, "Janne Raiskila" <>
    > wrote:
    >
    >
    >>If you have many links on your page i'd prefer this:
    >>
    >>place between <head> and </head>:
    >>
    >><script language=javascript>
    >>window.defaultStatus="";
    >></script>
    >>
    >>and the link:
    >>
    >><a href="editAuthor.asp?item=4" title="Edit author details"
    >>onMouseOver="window.status=this.title; return true;">Mickey Mouse</a>
    >>
    >>
    >>if you have only couple of links, you can do it this way also:
    >>
    >><a href="editAuthor.asp?item=4" title="Edit author details"
    >>onMouseOver="window.status=this.title; return true;"
    >>onMouseOut="window.status=' '; return true;">Mickey Mouse</a>

    >
    >
    > Thanks.
    >
    > I can see my error now. I wasn't properly invoking the javascript.
    >
    > <head>
    > <script language="JavaScript">
    > <!--
    > function statusMsg(msg) {
    > window.status=msg;
    > return true
    > }
    > //-->
    > </script>
    > </head>
    >
    > ...
    >
    > <td>
    > <A HREF="editAuthor.asp?item=4"
    > title="Edit author details"
    > onMouseOver="return statusMsg(this.title)"
    > onMouseOut="return statusMsg('')">Micky Mouse</A>
    > </td>
    >
    > Although I believe it makes no difference wheher the javascript is
    > places between the <head></head> or <body></body> tags, or so I've
    > been told.
    >


    What matters is the "return true" portion. But be aware that not all
    browsers allow the changing of the status bar. Its not there for
    tinkering with, its there to show information from the browser.


    --
    Randy
    comp.lang.javascript FAQ - http://jibbering.com/faq
     
    Randy Webb, Sep 7, 2004
    #9
    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. Loane Sharp

    status bar message in browser window

    Loane Sharp, Oct 18, 2004, in forum: HTML
    Replies:
    3
    Views:
    1,141
    brucie
    Oct 18, 2004
  2. harryos
    Replies:
    0
    Views:
    409
    harryos
    Oct 13, 2010
  3. topmind
    Replies:
    1
    Views:
    358
    Bart Van der Donck
    Jul 1, 2006
  4. xhe
    Replies:
    1
    Views:
    141
    Randy Webb
    Feb 9, 2007
  5. Ronen Yacov
    Replies:
    1
    Views:
    251
    David Dorward
    Nov 5, 2007
Loading...

Share This Page