views:

48

answers:

4

I'm using this code to change the status bar of IE.

<a href="http://www.google.com" onmouseover="window.status='Google';return true;">Google</a>

But the problem is when i'm using a menu (links inside a div) it doesn't change anymore the status bar. Is there any way to fix it?

A: 

I suspect, this works in only IE but it won't work for other browsers.

Sarfraz
+3  A: 

Most modern browsers allow the user to decide, if she wants the status bar being overwritable. If it is disabled (which is, I assume, the default in many browsers), you have no way to bypass this (other than finding a zero day exploit).

Boldewyn
And thank goodness for that...
David Thomas
+1  A: 
onmouseover="window.status='Google';

works only for IE. It doesn't seem to work for FF. What browser are you testing it?

Shoban
i'm using Internet Explorer 8
Remus Rigo
it worked for me in IE8
Shoban
+1  A: 

Here's an awesome solution

<a href="//./ Woo status bar" onclick="this.href='http://google.com'"&gt;

No, but really though - this practice this a little outdated. Users expect to be able to see the URL of the link they're about to click to ensure it is legit. If you want to give people more information about a link, encode it either in the paragraph (eg: "take a look at this big search engine or this up-and-coming one"), or use the title attribute on the link. The text you enter there will appear in a tooltip if the user hovers on the link.

nickf
The *awesome* solution doesn't work at all in IE6/7/8 and FF prefixes it with `file://`.
BalusC
Well, it depends on where you have the file. It'll be prepended with whatever the protocol is (http, file, https...). Anyway, it was kinda meant as a joke.
nickf