[thelist] image rollovers on layers

Duncan O'Neill dbaxo at ihug.co.nz
Tue Oct 1 17:25:01 CDT 2002


Alderson, Russ wrote:
> --
> [ Picked text/plain from multipart/alternative ]
> pardon the hair on the floor, but does anyone know how to do cross-browser
> image rollovers inside absolute positioned div's (layer's)? i think my dom
> referencing is off.
>
>  russ alderson

you just need to fork for code for NN4.x. e.g. if you're addressing
the first layer. (you can find out how many layers you have in
NN4.x by typing "javascript:alert(document.layers.length);" in
the location bar.)

function msover(imgName){
                          if (!document.layers){// code for sane browsers
                           }
                          else {// code for NN4.x

document.layers[0].document.images[imgName].src = imgName + "_over.src";
                          }

}

hth

--
Duncan O'Neill
The Urban Legend magazine
http://homepages.ihug.co.nz/~dbaxo/




More information about the thelist mailing list