PDA

View Full Version : 'area' definition to contain status bar text



matthewdean
12-21-2003, 06:43 PM
Hi,

This is probably an easy one but my researches have so far been unsuccessful.

This problem is not present in Netscape Navigator 7.1 or Mozilla 1.5; it is a problem with Internet Explorer 6.

I'm populating several bitmaps with areas; some I want to have links and tooltip text and status bar text, and other areas I want only to have tooltip text and status bar text. The tooltip text must always be different from the status bar text.

I'm using JavaScript to populate the status bar on mouseover. The rules seem to be different when treating <AREA HREF= ...> definitions and when treating <A HREF ...> definitions.

Where there's no link in the AREA definition, it's no problem to get different tooltip text and status bar text in the same AREA definition. But where there's a link in the AREA definition it is impossible to populate the status bar with text, and the pathname appears by default. The pathname doesn't appear by default for standard links.

As a result I'm stumped. Can anyone please help me out with this?

Cheers,
matt

paulhiles
12-21-2003, 06:56 PM
Hi Matt,

I'm not sure whether I've followed your post accurately, but one method for setting a default for the status bar message is this:

<body onload="window.defaultStatus='Your default message would go here';return true;">

I used this on one of my first commissioned sites at Bite-Back.com (http://www.bite-back.com).
See the status bar as you MouseOver the menu buttons.

Hope that helps

Paul

matthewdean
12-21-2003, 08:45 PM
Paul: thanks for your quick post. I must admit on rereading it that confusion can easily result from reading my explanation...

I really appreciate your tip.

The line you sent me goes into the BODY definition and defines the contents of the status bar when there's no mouseover at all.

My interest is doing what you've done in the shark website you designed.

My problem is the different ways that IE6 and NN7 handle mouseovers. I want the status bar text to appear on mouseove for an area of a bitmap. The definition is the AREA type. The code I copied from online works fine for NN7 but not for IE6.

In your shark website, the code that goes into the link (AREA) definition is resorced from an external .js file... Would you be prepared to post it to the forum?

matt

PS: I found the fix for this bug at http://developer.irt.org/script/1424.htm . It's a bug in Internet Explorer 5. To workaround include a delay:

<html>
<head>
<script language="JavaScript"><!--
function showStatus(text) {
window.setTimeout('window.status="' + text + '"', 1);
}
//--></script>
</head>
<body>
link text (somewhere.htm)
</body>
</html>


Thanks for your help

Matt