Forum Moderators: open

Message Too Old, No Replies

status bar

         

Encore

12:55 pm on Jan 10, 2005 (gmt 0)

10+ Year Member



Can anyone point out an easy way to stop the a hovered link url appearin g in the status bar. Have a page with amazon products, don't want the amazon url with tag being shown, would prefere something like: "Click here to view Amazon page for this album".

Am sure it's simple, just do not know javascript.

BlobFisk

1:03 pm on Jan 10, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



How about using a combination of the title attribute and window.status?

Your link could be:

<a href="link.page" title="Title of the Link" onmouseover="window.status='Title'" onmouseout="window.status=''">Link Text</a>

It will become tedious if you have to do it manually for every link. On a usability note, some users may not appreciate this. I for one like to see where a link will take me by looking at the URL in the status bar...

HTH

StupidScript

12:43 am on Jan 11, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Good point about the user experience, BlobFisk.

To cut down on the characters needed, I usually set up a little function and put it in the HEAD section of all my pages:

<script type="text/javascript" language="javascript">

function setStat(msg) {

top.status=msg;

return true;

}

</script>

(You need to "return true" to see the result immediately on most browsers.)

Then, in my BODY tag, I set up the default status message:

<body onload="defaultStatus='Welcome!'">

Then in each hyperlink, I add code to trigger the function and show the appropriate message in the status bar:

<a href="somepage.html" onmouseover="return setStat('Go to somepage.html')">SomePage</a>

With this setup, here's what happens:

The page loads, and "Welcome!" is shown in the status bar.
When the visitor mouses over a link, the status bar changes.
When the visitor mouses out of the link, the status message returns to the default "Welcome!".

But do keep in mind that some visitors will prefer to see the actual hyperlink URI in the status bar instead ... and keep in mind that many of your visitors won't even look at the status bar at all! (Don't use this for important messages.)

And, please do everyone a favor by NOT using one of those "scrolling status bar" scripts that are floating around. Those things are just terrible. They distract from your page content and flicker like crazy onmouseover.

:)