Search the archives!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Javascript] Onmousemove event
- From: flavio at economisa.com.br (Flavio Gomes)
- Subject: [Javascript] Onmousemove event
- Date: Tue Jul 27 12:39:43 2004
The effect you want is something like this?
Check attachment.
Flavio Gomes
flavio@xxxxxxxxxxxxxxxx
Iztok Polanic wrote:
>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
>
>
-------------- Próxima Parte ----------
Um anexo em HTML foi limpo...
URL: http://lists.LaTech.edu/pipermail/javascript/attachments/20040727/d022731d/something.htm
-------------- Próxima Parte ----------
Um anexo n?o texto foi limpo...
Nome : lay.GIF
Tipo : image/gif
Tam : 1076 bytes
Descr.: n?o dispon?vel
Url : http://lists.LaTech.edu/pipermail/javascript/attachments/20040727/d022731d/lay.gif
-------------- Próxima Parte ----------
Um anexo n?o texto foi limpo...
Nome : myrange.GIF
Tipo : image/gif
Tam : 1297 bytes
Descr.: n?o dispon?vel
Url : http://lists.LaTech.edu/pipermail/javascript/attachments/20040727/d022731d/myrange.gif
- Follow-Ups:
- [Javascript] Onmousemove event
- From: Iztok Polanic
- [Javascript] Onmousemove event
- References:
- [Javascript] Onmousemove event
- From: Iztok Polanic
- [Javascript] Onmousemove event
- Prev by Date: [Javascript] Onmousemove event
- Next by Date: [Javascript] Onmousemove event
- Previous by thread: [Javascript] Onmousemove event
- Next by thread: [Javascript] Onmousemove event
- Index(es):