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

window.status Javascript

P: n/a
hey guys,

i have been searching around... and it seems that the below code is
good for a SINGLE PAGE.

<BODY BGCOLOR=white onMouseOver="window.status=' something ';return
true">
but... i have TONS of pages, and instead of going to each page and
adding this code, i was wondering if the above code could be done in a
javascript that i can put in my HEAD... such as <SCRIPT> ....</SCRIPT>

in my hundreds of pages, I have them pointing to one page that has a
list of scripts.... and would like to add that script here.
Jul 20 '05 #1
Share this Question
Share on Google+
12 Replies


P: n/a
Steve hu kiteb:
hey guys,

i have been searching around... and it seems that the below code is
good for a SINGLE PAGE.

<BODY BGCOLOR=white onMouseOver="window.status=' something ';return
true">
but... i have TONS of pages, and instead of going to each page and
adding this code, i was wondering if the above code could be done in a
javascript that i can put in my HEAD... such as <SCRIPT> ....</SCRIPT>

in my hundreds of pages, I have them pointing to one page that has a
list of scripts.... and would like to add that script here.


This kind of thing can be done in javascript, but would be done far more
efficiently in a style sheet.
--
--
Fabian
Visit my website often and for long periods!
http://www.lajzar.co.uk

Jul 20 '05 #2

P: n/a
Steve wrote on 15 nov 2003 in comp.lang.javascript:
i have been searching around... and it seems that the below code is
good for a SINGLE PAGE.

<BODY BGCOLOR=white onMouseOver="window.status=' something ';return
true">
The return true has no purpose, methinks.

but... i have TONS of pages, and instead of going to each page and
adding this code, i was wondering if the above code could be done in a
javascript that i can put in my HEAD... such as <SCRIPT> ....</SCRIPT>


While you can do this:

<SCRIPT>
document.body.onclick=function(){window.status='so mething'}
</SCRIPT>

you have to write it AFTER the <body> declaration.

=============================

why not simply do this in the header:

<SCRIPT>
window.status='something else'
</SCRIPT>

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jul 20 '05 #3

P: n/a

"Evertjan." <ex**************@interxnl.net> wrote in message
news:Xn********************@194.109.133.29...
Steve wrote on 15 nov 2003 in comp.lang.javascript:
i have been searching around... and it seems that the below code is good for a SINGLE PAGE.

<BODY BGCOLOR=white onMouseOver="window.status=' something ';return true">


The return true has no purpose, methinks.

but... i have TONS of pages, and instead of going to each page and
adding this code, i was wondering if the above code could be done in a javascript that i can put in my HEAD... such as <SCRIPT> .....</SCRIPT>


While you can do this:

<SCRIPT>
document.body.onclick=function(){window.status='so mething'}
</SCRIPT>

you have to write it AFTER the <body> declaration.

=============================

why not simply do this in the header:

<SCRIPT>
window.status='something else'
</SCRIPT>

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

Jul 20 '05 #4

P: n/a
[Apologies for my previous, pointless post]

"Evertjan." wrote on 15/11/2003:
Steve wrote on 15 nov 2003 in comp.lang.javascript:
i have been searching around... and it seems that the below code is good for a SINGLE PAGE.

<BODY BGCOLOR=white onMouseOver="window.status=' something ';return true">


The return true has no purpose, methinks.


Although this might be out-of-date, it is worth noting for
compatibility's sake. From Netscape's "Client-Side JavaScript
Reference", version 1.3 (1999):

"You can set the status property at any time. You must return true if
you want to set the status property in the onMouseOver event handler."
Description of the window.status property.

Mike

--
Michael Winter
M.Winter@[no-spam]blueyonder.co.uk (remove [no-spam] to reply)
Jul 20 '05 #5

P: n/a
Michael Winter wrote on 15 nov 2003 in comp.lang.javascript:
"You can set the status property at any time. You must return true if
you want to set the status property in the onMouseOver event handler."
Description of the window.status property.


This would in practice only be important if you
do a <a onmouseover=...
because a false return disables the href executuion
(even then at least IE defaults to true)
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jul 20 '05 #6

P: n/a
<SCRIPT>
window.status='something else'
</SCRIPT>

the above script does not work...
if there is no javascript that does this... can anyone tell me how to
do it in css sheet?

steve
"Evertjan." <ex**************@interxnl.net> wrote in message news:<Xn********************@194.109.133.29>...
Michael Winter wrote on 15 nov 2003 in comp.lang.javascript:
"You can set the status property at any time. You must return true if
you want to set the status property in the onMouseOver event handler."
Description of the window.status property.


This would in practice only be important if you
do a <a onmouseover=...
because a false return disables the href executuion
(even then at least IE defaults to true)

Jul 20 '05 #7

P: n/a
st***@lo-fimedia.com (Steve) writes:
<SCRIPT>
window.status='something else'
</SCRIPT>

the above script does not work...
It does for me.
That is, you have not given sufficient information for us to do anything
about your problem.

These all work for me:

---
<script type="text/javascript">
window.status="foo";
</script>
<img src="../../PicA.png"
onmouseover="window.status='bar';return true;"
onmouseout="window.status='';return true;">
<input type="button" value="set baz!" onclick="window.status='baz';">
---

Tested in IE6, Moz FB and Opera 7.
if there is no javascript that does this... can anyone tell me how to
do it in css sheet?


It can't be done with CSS.

/L
--
Lasse Reichstein Nielsen - lr*@hotpop.com
DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html>
'Faith without judgement merely degrades the spirit divine.'
Jul 20 '05 #8

P: n/a
okay...

as stated earlier.. i have about 300 pages. all pages go to this ONE
page where i just list all my javascripts (so i only need to modify
one page). this one page is has no body, no text, just a collection of
script i use throughout the whole site.

rather than going to each page and adding a script in the body or the
link, i want a <SCRIPT> that i can just add in my ONE page. this
means that this script can not use <BODY> tags... or <IMAGE> tags...
just a script in my one page to make it so no one can view the urls of
my files.

does this help? and is this possible?
Jul 20 '05 #9

P: n/a
Steve wrote on 18 nov 2003 in comp.lang.javascript:
<SCRIPT>
window.status='something else'
</SCRIPT>

the above script does not work...


It does here on IE6
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jul 20 '05 #10

P: n/a
st***@lo-fimedia.com (Steve) writes:
as stated earlier.. i have about 300 pages. all pages go to this ONE
page where i just list all my javascripts (so i only need to modify
one page). this one page is has no body, no text, just a collection of
script i use throughout the whole site.
So, you include a big JS-*file* in all your pages, and you do so in
the head element. It is not a page, just a file (I hope :).

Do the pages have a body.onload handler? If you want to centralize the
code, it would be smart if all 300 pages had
<body onload="init()">
and then the init function would set up the things that can't be handled
while the page is still being loaded.
rather than going to each page and adding a script in the body or the
link, i want a <SCRIPT> that i can just add in my ONE page. this
means that this script can not use <BODY> tags... or <IMAGE> tags...
This sucks, and there isn't a lot you can do about it. If your code
must run while the head element is being loaded, then it can't access
the body element. In order for it to run later, you must provide some
sort of hook.
just a script in my one page to make it so no one can view the urls of
my files.
Why on earth do you think you need that. The URL is still there, and there
are lots of ways to find it. However, hiding it from the statusbar has only
one use: To annoy the users (and will fail in some browsers, no matter what
you do).
does this help? and is this possible?


Yes. Probably not. You can use setTimeout to delay execution of some
code until the body element is perhaps loaded. Or even use setInterval
to keep trying until it is. But it will never be pretty.

/L
--
Lasse Reichstein Nielsen - lr*@hotpop.com
DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html>
'Faith without judgement merely degrades the spirit divine.'
Jul 20 '05 #11

P: n/a
Fabian wrote:
Steve hu kiteb:
<BODY BGCOLOR=white onMouseOver="window.status=' something ';return
true">
but... i have TONS of pages, and instead of going to each page and
adding this code, i was wondering if the above code could be done in a
javascript that i can put in my HEAD... such as <SCRIPT> ....</SCRIPT>

in my hundreds of pages, I have them pointing to one page that has a
list of scripts.... and would like to add that script here.


This kind of thing can be done in javascript, but would be done far more
efficiently in a style sheet.


Unlikely. It is the status bar the OP wants to manipulate and
I have never heard of a (proprietary) CSS property that does that.
PointedEars
Jul 20 '05 #12

P: n/a
Steve wrote:
<BODY BGCOLOR=white onMouseOver="window.status=' something ';return
true">
but... i have TONS of pages, and instead of going to each page and
adding this code, i was wondering if the above code could be done in a
javascript that i can put in my HEAD... such as <SCRIPT> ....</SCRIPT>

in my hundreds of pages, I have them pointing to one page that has a
list of scripts.... and would like to add that script here.


The issue of including a script library containing the code aside,
you want to leave the status bar as is because it is *my* status
bar, a useful tool, and not your playground nor that of any other
scriptkiddie. Recent UAs have means to block JavaScript access to
the status bar, too.
PointedEars
Jul 20 '05 #13

This discussion thread is closed

Replies have been disabled for this discussion.