Forums

This topic is locked

onMouseOver message gets stuck in Status Bar!

Posted 30 Dec 2002 16:38:11
1
has voted
30 Dec 2002 16:38:11 k c posted:
Hi there

When I set text of Status Bar for onMouseOver event on a particular image (I'm doing this from Behavior Panel), it seems the text gets stuck there once the onMouseOver fires for the first time, even if mouse is out. Help??

Replies

Replied 31 Dec 2002 13:37:16
31 Dec 2002 13:37:16 Lee Diggins replied:
Hi Mr Peach,

to clear the status bar, add another status bar behaviour with nothing entered, blank text, then change the behaviour to onmouseout.

You should then have two behaviours, similar to the ones below:

<pre id=code><font face=courier size=2 id=code>onMouseOver="MM_displayStatusMsg('This is a link');return document.MM_returnValue" </font id=code></pre id=code><pre id=code><font face=courier size=2 id=code>onMouseOut="MM_displayStatusMsg('');return document.MM_returnValue" </font id=code></pre id=code>



Digga

Sharing Knowledge Saves Valuable Time!!!
Replied 31 Dec 2002 14:48:26
31 Dec 2002 14:48:26 k c replied:
Hi Digga

Your method works but the Status Bar default (in IE, it's "done" is then overwritten by the empty string ''. I'm sure I can put "done" to make it look like browser's default but is there a more elegant way doing it? Like setting document.status to its default value??
Replied 31 Dec 2002 15:13:51
31 Dec 2002 15:13:51 k c replied:
I think when a page is loaded, the value of status will be overwritten once the mouse is moved onto any objects on the page, and its value becomes null. So I guess there's no point showing "done" all the time, otherwise it just looks dumb..

Digga's got the point.
Replied 31 Dec 2002 15:39:24
31 Dec 2002 15:39:24 Lee Diggins replied:
Hi Mr Peach,

I'm sure there is a way using the BOM or DOM, as I was on an advanced javascript course about a year ago and there was an example of it. I'll check my notes when I get back to work later this week and post a reply if I find it.

Digga

Sharing Knowledge Saves Valuable Time!!!

Reply to this topic