javascript/css netscap-ism work-around?
by Cara Fealy <cara(at)achoate.com>
|
Date: |
Mon, 21 Aug 2000 19:23:25 -0500 |
To: |
hwg-style(at)hwg.org |
|
todo: View
Thread,
Original
|
|
Hi,
I apologize if this has been sent to the list before; hwg-style is not
archived and I couldn't find anything in the FAW regarding this particular
netscapism javascript/css work-around.
I've got a simple javascript rollover for a left nav-bar that's placed
using the styled {position:absolute} in a class definition. The rollovers
work in seamonkey and in IE, and the css and html validate on the w3c site,
but when I test Communicator 4.74, I get javascript errors and no rollovers
(which makes me think it's a netscapism -- grr!). The site's not up,
otherwise I'd point you to a URL, but code snippets follow.
The rollovers are just aesthetic affordances (I could do it in tables or
without the graphic elements) but I'm trying to learn the nuances of
stylesheets and four hours of testing and web searching hasn't helped.
*Any* advice besides generating an initial browser test would be greatly
appreciated.
thanks!
/cara
cara(at)achoate.com
from the stylesheet:
.navbar {
position: absolute;
left: 11px;
top:61px
}
from the javascript: (the webmonkey source is acknowledged in the long version)
function WM_imageSwap(daImage, daSrc){
var objStr,obj;
if(document.images){
if (typeof(daImage) == 'string') {
objStr = 'document.' + daImage;
obj = eval(objStr);
obj.src = daSrc;
} else if ((typeof(daImage) == 'object') && daImage && daImage.src) {
daImage.src = daSrc;
}
}
}
from the html:
<p class="navbar"><a href="./" onMouseOver="WM_imageSwap('home',
'graphics/nav-home-over.gif');" onMouseOut="WM_imageSwap('home',
'graphics/nav-home.gif');" onMouseDown="WM_imageSwap('home',
'graphics/nav-home-down.gif');"><img src="graphics/nav-home.gif"
width="118" height="37" border="0" alt="home" name="home"></a><br>
HWG hwg-style mailing list archives,
maintained by Webmasters @ IWA