Can't change window.status message - help!

M

mark4asp

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.
 
M

mark4asp

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.
 
R

rf

mark4asp said:
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.
 
J

Janne Raiskila

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>
 
P

Peter Connolly

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.
 
R

rf

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.
 
L

Laurent Bugnion, GalaSoft

Hi,
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
 
R

Richard Rundle

Laurent Bugnion said:
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 ?
 
R

Randy Webb

mark4asp said:
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top