PDA

View Full Version : Rollover problems in navigator


mr lunch
12-21-2000, 03:05 AM
Hi,
has any one had any problems with rollovers created in dreamweaver 3 not being visible in Netscape?[nbsp][nbsp]they are fine in IE 4.5.
Is this a javascript error?
Any help will be much appreciated

thanks
mr lunch

Tibbits
12-21-2000, 03:27 PM
well.. I'm not sure this is strictly true. Yes, Netscape lower than v6 doesn't support the a:hover text style attribute but netscape from version 3 upwards does support onmouseover and onmouseout (iirc) although the use is very resticted, since Netscape will not change the content of a page after it has loaded without refreshing, with the exception of image rollovers in v4 provided they are coded so that Netscape recognises them.

After a lot of fiddling, I've got this code working so that it roll-overs in IE and NN and doesn't cause JS errors in lower versions of NN.


<script language=&quot;JavaScript&quot;><!--
function over(imgname){if(document.images){document[imgname].src=&quot;images/&quot;+imgname+&quot;on.jpg&quot;}}
function out(imgname){if(document.images){document[imgname].src=&quot;images/&quot;+imgname+&quot;off.jpg&quot;}}
//--></script>

<a href=&quot;&quot; onMouseOver=&quot;over('image')&quot; onMouseOut=&quot;out('image')&quot;><img src=&quot;images/imageoff.jpg&quot; name=&quot;image&quot; border=0></a>


However, since Dreamweaver seem to have quite a Netscape bias, since it supports layers which even Netscape seems to have given up on in v6, I don't see why code it generates doesn't work. Could you provide an example URL?

mr lunch
12-21-2000, 07:30 PM
Thank you Keiichi and thank you Tibbits,

My url is[nbsp][nbsp]http://www.clannzu.com
The first splash page has a cricket that has a rollover of a music note above the crickets head.

The other rollovers are the menu items on each page.

Once again thank you for your help,
Mr lunch

Tibbits
12-21-2000, 07:51 PM
The image on the splash page doesn't load at all, it's trying to load the image from your hard disk rather than the website. I assume internet explorer is actually loading the image from your disk (which doesn't work for me since I don't have a copy) but netscape is saying 'eh?'

Not being familiar with either Dreamweaver of Macs I can't really comment on how to fix it unfortunately, unless you want to edit the code by hand and change the image urls to relative links eg 'Images/image.gif'.
As for the code itself.. haven't a clue whether it works, and it is way to late for me to try and decode it.

Keiichi
12-21-2000, 10:31 PM
I think if you just edit the code inside the script manually and put all the right links like tibbits said. I think dreamweaver is putting in the codes right except for your image links.

Keiichi
12-22-2000, 12:58 AM
'onmouseover' and 'onmouseout' doesn't work on netscape, neither does link hovers with ccs.