PDA

Click to See Complete Forum and Search --> : onMouseover not working in NS6.


pnj
Feb 22nd, 2001, 02:59 PM
heres the code:
***********
<a href="#"onMouseOver="showMenu('NorthLayer')>
***********
function showMenu(menuName)

if(ns)
{

eval("document" + layerRef + "['" + menuName + "']" + styleRef + ".visibility = '" + showRef + "'");

*******
this is where the layerRef,styleRef,showRef come from

if (ns){ // for netscape
layerRef = ".getElementById";
styleRef = ".style";
showRef = "visible";
hideRef = "hidden";
}

********
in IE this(the ie version,very simmalar to this) I get dynamic dropdown menus

in Netscape I get nothing. this is Netscape 6 I am trying to get this to work in.

I can get an alert to show up from the showMenu function so I know I am reaching it, but my layer just won't show up..

any suggestions?

thanks

Psyrus
Feb 25th, 2001, 03:32 PM
I think this is your problem:

styleRef = ".style";


I do not believe Netscape uses 'style'.

Take the "." out of ".visibility"

change styleRef = ".";

In your IE code use styleRef = ".style."; with a "." on either side of style.

pnj
Feb 26th, 2001, 12:13 PM
well,
I sortof got it to work, the code now looks like this

eval("document.getElementById('NorthLayer').style.left = '" + position + "px" +"'");

the problem I am having now is the images don't allways 'show' upon Mouseover and Mouseoff.

I meen, they swap just fine then, randomly they will just 'disapear'.
I don't get it


thanks for your help