Links

Lists

Latest Updates

Ruby On Rails List
Python list
Advanced Java
The JavaScript List
Apache Users
Full Disclosure
Linux Security

Search the archives!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Javascript] Onmousemove event


  • From: iztok.polanic at amis.net (Iztok Polanic)
  • Subject: [Javascript] Onmousemove event
  • Date: Tue Jul 27 14:48:01 2004

Hi!

> ...or is that not necessary for one-liners?

That's correct!

Bye,

Iztok

Original Message:
>From: "Iztok Polanic" <iztok.polanic@xxxxxxxx>

>Hi!
>
>Me again. I hope this time without quarrell. :) Below is a script which
>works find in IE but not so good in Firefox.
>
>var IE = document.all ? true : false;	
>	
>if (!IE) {
>	window.captureEvents(Event.MOUSEMOVE);	
>	window.onmousemove = mouse_move;
>} else 
>	document.onmousemove = mouse_move;		
>
>function mouse_move(e) {
>	if (IE) {
>		tempX = event.clientX;
>		tempY = event.clientY;
>	} else {
>		tempX = e.pageX;
>		tempY = e.pageY;
>	}
>	
>	// lay
>	leftPos = document.getElementById('lay').offsetLeft;
>	topPos = document.getElementById('lay').offsetTop;
>	sirinaPos = document.getElementById('myrange').offsetWidth;
>	visinaPos = document.getElementById('myrange').offsetHeight;
>	
>	if(tempX >= leftPos && tempX <= (leftPos + sirinaPos) && tempY >=
>topPos && tempY <= (topPos + visinaPos)) 
>		document.getElementById('lay').style.display = 'none';
>	else
>		document.getElementById('lay').style.display = '';
>}
>
>In Firefox the picture is displaying and dissapiring. Why? How can this be
>fixed?
>
>Bye,
>
>Iztok


_______________________________________________
Javascript mailing list
Javascript@xxxxxxxxxx
https://lists.LaTech.edu/mailman/listinfo/javascript