...

View Full Version : Hiding / Placing Text In Status Bar



underthesea
06-24-2002, 11:08 PM
This is probably something easy to do but it's eluded me so far ! How do I enter text into the status bar to hide where the pages are being loaded from (my site is hosted in one place and then ghosted onto the main address) any help much appreciated .

simon@thesickroom.co.uk

jkd
06-24-2002, 11:21 PM
window.status = 'my message';

If called from an event such as onmouseover in an <a> element, you'll need a return true:

<a href="#" onmouseover="window.status = 'hello world'; return true" onmouseout="window.status=''">a link</a>

:)

Zvona
06-25-2002, 08:29 AM
Originally posted by jkd
window.status = 'my message';

If called from an event such as onmouseover in an <a> element, you'll need a return true:

<a href="#" onmouseover="window.status = 'hello world'; return true" onmouseout="window.status=''">a link</a>

:)

In addition: I always wondered why you have to add also return true;. This prevents URL of the link (which is usually shown) to misplace your window.status string value.

There's also defaultStatus property, which is shown by default. However, I see no reason to use it, because it doesn't help user at all when his/her status bar has text "Welcome to my site" on it.

And, though window is a top-level object, it's adviced to use window reference at least before :
window.status
window.event

redhead
06-25-2002, 07:08 PM
on my site i used to do nearly every link with that on... and to be honest its quite long for what it does to put on every link... so i do it something like this...



<script language="JavaScript" type="text/javascript">
function bar(message) {
self.status=message; return true}
function out() {
bar('')}
</script>

<a href="page.html" onmouseover="return bar('whatever')" onmouseout="out()">Link</a>

Hope this helps...

StarWrist
06-26-2002, 03:03 AM
But how do you do that within an image map?

justame
06-26-2002, 03:22 AM
Originally posted by StarWrist
But how do you do that within an image map?

star...
just a likeŽ this...:O)))


<a href="my_map.map"><img src="my_image.gif" border=0
usemap="#foo" ismap></a>

<map name="foo">
<area href="yellow.html" coords="20,20,70,60"
onMouseOver="window.status='yellow'; return true">
<area href="red.html" coords="90,20,140,60"
onMouseOver="window.status='red'; return true">
<area href="blue.html" coords="20,80,70,120"
onMouseOver="window.status='blue'; return true">
<area href="green.html" coords="90,80,140,120"
onMouseOver="window.status='green'; return true">
</map>


http://hotwired.lycos.com/webmonkey/96/40/index3a.html?tw=programming

StarWrist
06-26-2002, 03:50 AM
That works. But only partially. It leaves if on there but it doesn't put it on there when I roll the pointer over the clickable part of the map. (If that makes any sense to you, it does in my head, but it's crazy in there...)

I want it to display text down in the status bar when I put the cursor over the link. Not just down there all the time.

Think you can help?

QuackHead
06-26-2002, 04:08 AM
ok.. same goes for an imagemap...

<a href="#" onMouseOver="window.status='your status text'; return true;" onMouseOut="window.status=''; return true;">click here</a>

That's pretty much it.

~Quack

QuackHead
06-26-2002, 04:11 AM
sorry, I'll post for the image map part..

<area href="#" onMouseOver="window.status='Your Status Text'; return true;" onMouseOut="window.status=''; return true;" shape="rect" coords="0,0,100,100">

hope that clears it up

~Quack

bassleader
08-01-2002, 04:28 PM
This isn't working for me, I still get the URL of the link showing. Is there anything else that might cause the problem?

BL



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum