Closed Thread Icon

Topic awaiting preservation: layerposition (Page 1 of 1) Pages that link to <a href="" title="Pages that link to Topic awaiting preservation: layerposition (Page 1 of 1)" rel="nofollow" >Topic awaiting preservation: layerposition <span class="small">(Page 1 of 1)</span>\

Nervous Wreck (II) Inmate

Insane since: Feb 2002

posted posted 04-01-2002 16:42

my task is to write a script, which shows something when the mouse moves over a certain region of the screen.

After I included a browser sniffer I wrote the following:

function loslegen() {
if (NS4) {
window.onMouseMove = MoveHandler; }
else{window.document.onmousemove =MoveHandler ;}


function MoveHandler(e) {
xpos = (document.layers) ? e.pageX : document.body.scrollLeft+event.x;
ypos = (document.layers) ? e.pageY : document.body.scrollTop+event.y;

x= eval(lst+"keinzut"+lse+llt);
y= eval(lst+"keinzut"+lse+ltp);

if ((xpos>=x && xpos<=xx)&&(ypos>=y && ypos<=yy)){ alert (x +"---" +y);


this does not work under IE.
Any idea?


Maniac (V) Mad Scientist

From: New California
Insane since: Mar 2000

posted posted 04-02-2002 07:22

It would be much easier to help if we could see all the relevant code. It's impossible to know for sure with the information you've posted.

I will take a guess and say that you are not calling the loslegen function with an onload event.

. . : newThing

Nervous Wreck (II) Inmate

Insane since: Feb 2002

posted posted 04-04-2002 13:12

I do call the function with an onLoad event.
meanwhile I found that IE did not see any properies of the layer. So I put the layer style in the div tag. and it worked.

But because I call the loslegen function with the onLoad every mouse movement causes a n event and I was told that this will be a problem for old computers.

Now puting the event in the Layer it self seems not to work.

<div id="keinzut" style="position:absolute; left:10; top:600; font:normal 10px Arial; layer-background-color:green; background-color:green; border:0.1px solid green; width:300; height:100; z-index:1000" > TEXT</div>


if (NS4) {
window.document.keinzut.onMouseMove = MoveHandler;
else if (IE){
window.document.all.keinzut.onmousemove =MoveHandler ;
else { window.document.getElementById("keinzut").onmouseover =MoveHandler;}

function MoveHandler(e) {
do something ( I want to let an other layer be visible)

all browsers do not recognise the properties of the layer.

do any of you know how I can let the mouseover event works only in the layer


« BackwardsOnwards »

Show Forum Drop Down Menu