PDA

View Full Version : Onmouseover message on status bar


Dufushipster
May 22, 2009, 05:46 PM
I'm trying a simple exercise in javascript that's supposed to make the phrase "Dangerous color" appear in the status bar when I onmouseover the "Link," but instead, the phrase "Dangerous color" changes to "file:////C:dave/Other/Computer/somelink.html" (which is the file name where I have this simple program saved) when I onmouseover the "Link." Do I have a computer virus doing this or is it actually doing what I'm telling it to do?

Program:
<A HREF="somelink.html" onmouseover="document.bgColor='#FF0000';window.status='Dangerou s color'" onmouseout="document.bgColor='#FFFFEE'">Link</A>

Again, when I put my mouse over the word "Link," the phrase phrase in the status bar changes from "Dangerous color" to "file:////C:dave/Other/Computer/somelink.html". How do I get the phrase "Dangerous color" to appear on the status bar when I onmouseover "Link," and then disappear when I onmouseout the "Link"?

And by the way, did I post a javascript question in the right place?

crigby
Jun 8, 2009, 07:35 PM
Hi,
I believe that the correct item to use is window.defaultStatus according to the HTML DOM.
Peace,
Clarke