2

You know when you hover a < a> element and the link appears in the bottom left corner of the browser? Is it possible to do it with another tag?

Lucas Steffen
  • 1,244
  • 2
  • 10
  • 22

2 Answers2

4

No, but you can put an <a> element over/around another element and 'disable' the link (onclick) using javascript to achieve a similar result:

<a href="//Message in the status bar!" onclick="return false">
    <div>
         This div shows something in the status bar 
         but is actually surrounded by a disabled link
    </div>
</a>
sjkm
  • 3,887
  • 2
  • 25
  • 43
  • Good answer, but the status bar will look something like this: "http://message%20in%20the%20status%20bar%21" (See https://jsfiddle.net/6gexggqa/1) To make it more meaningful, you could use `href="about:Message...`. (See https://jsfiddle.net/6gexggqa/) – Rick Hitchcock Mar 30 '16 at 18:23
  • @RickHitchcock Thank you :)! That's a good idea! – sjkm Mar 30 '16 at 20:45
  • Problem is that it has some incomprehensible css that nobody wants to mess with, and putting anything else will break the responsiveness. – Lucas Steffen Mar 30 '16 at 20:58
  • I prefer using a hash symbol in front of the message, like: `href="#Message in status bar`. This way, even if javascript is disabled (or not executing due to an error), clicking will not navigate to another page, but merely update the url in the address bar. – Protector one Jul 10 '23 at 12:33
3

No. Setting the status bar manually has been disabled in modern browsers for security reasons. A malicious site developer could make the status bar display a different URL than the one they would be taken to on a link.

The Javascript property used to work like this:

window.status = "Status bar text";

This no longer does anything at all by default on any current browser.

omnichad
  • 1,635
  • 1
  • 11
  • 10