By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,478 Members | 1,458 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,478 IT Pros & Developers. It's quick & easy.

getting value of the status bar

P: n/a
hey,

I know in the new browsers you're not able to change the value of the
status bar. Which is fair enough, i understand why and agree.

Although, i cant seem to get the value of the status bar. One used to
be able to do window.status.

But that doesnt seem to work. Wondered if someone could point me in
the right direction.

Cheers!

Nov 30 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a
daveyand wrote on 30 nov 2006 in comp.lang.javascript:
I know in the new browsers you're not able to change the value of the
status bar. Which is fair enough, i understand why and agree.

Although, i cant seem to get the value of the status bar. One used to
be able to do window.status.

But that doesnt seem to work. Wondered if someone could point me in
the right direction.
A status bar has no value, only javascript objects can have a value.

The text content of some statusbars was read/write accessable through the
value of the window.status object, but that is no more in IE7.

However, hovering over an <ashows it's normalized href content in the
statusbar and that is accessable:

<a href="page.html"
onmouseover="alert(this.href)">
click here</a>

[it will show in the status bar after the alert is closed]

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Nov 30 '06 #2

P: n/a
Lee
daveyand said:
>
hey,

I know in the new browsers you're not able to change the value of the
status bar. Which is fair enough, i understand why and agree.

Although, i cant seem to get the value of the status bar. One used to
be able to do window.status.

But that doesnt seem to work. Wondered if someone could point me in
the right direction.
My first thought is that the right direction is backwards, as in
take a step back and look again at what information it is that you
want to get. There may be a better source than the status bar.
--

Nov 30 '06 #3

P: n/a
Daz

daveyand wrote:
hey,

I know in the new browsers you're not able to change the value of the
status bar. Which is fair enough, i understand why and agree.

Although, i cant seem to get the value of the status bar. One used to
be able to do window.status.

But that doesnt seem to work. Wondered if someone could point me in
the right direction.

Cheers!
Other than when you hover the cursor over a link, the only text in the
status bar, should be the text that you have placed there using your
script. Perhaps you should consider keeping track of what values are in
the status bar by designing a simple object/function that can represent
your status bar?

Something like this might work, although I haven't tested it. I am sure
you can see what i am getting at, however.
<---------- CODE START ---------->

<html>
<head></head>
<body onload="doStuff();">
<script type="text/javascript">
function statusBar()
{
var sbText;
this.set = function(statusText)
{
sbText = statusText;
window.status = sbText
}

this.get = function()
{
return sbText;
}
}

var sb = new statusBar();

function doStuff()
{
sb.set('Some text');
alert("Status Bar text: " + sb.get());
sb.set('Some different text');
alert("New Status Bar text: " + sb.get());
}

</script>
</body>

<----------- CODE END ---------->

Nov 30 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.