Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / HTML, CSS, Scripts / JavaScript / November 2006



Tip: Looking for answers? Try searching our database.

getting value of the status bar

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
daveyand - 30 Nov 2006 16:57 GMT
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!
Lee - 30 Nov 2006 17:10 GMT
daveyand said:

>hey,
>
[quoted text clipped - 6 lines]
>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.

--
Evertjan. - 30 Nov 2006 17:25 GMT
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.
[quoted text clipped - 4 lines]
> 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]

Signature

Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)

Daz - 30 Nov 2006 23:49 GMT
> hey,
>
[quoted text clipped - 8 lines]
>
> 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 ---------->
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.