getting value of the status bar

D

daveyand

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

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.


--
 
E

Evertjan.

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 <a> shows 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]
 
D

Daz

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.

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

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

Forum statistics

Threads
473,778
Messages
2,569,605
Members
45,238
Latest member
Top CryptoPodcasts

Latest Threads

Top