Search code examples
phpjqueryajaxzend-frameworkstatusbar

How to hide links on browser's statusbar when you mouseover on links on webpage?


I am using Zend, PHP, AJAX, JQuery in my projects. Question is that how can I force to not display a link on browser's statusbar when I mouseover on a link on my webpage.

Best example is on this site, when you mouseover the up-vote link on this site, it does not show the link and after click the votes increased without refreshing the page.

Thanks


Solution

  • On Stack Overflow, you don't see an address, because it isn't a link (i.e. it isn't an anchor). It is a span, image or other element, with an onclick event handler.

    This is the only way to guarantee no status-bar text in all browsers as the old-school JavaScript method of setting window.status = ""; has no effect in most browsers these days.

    So, for example...

    [Html]
    <img id="clickme" src="myimage.png" alt="My Image" title="Vote">
    
    [JavaScript (jQuery)]
    $("#clickme").click(function() { alert("You clicked me"); });