🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: pl.comp.lang.javascript
Article #49676

pozycja kursora myszy

#49676
From: Piotr Borowski
Date: Tue, 12 Jan 2010 17:05
21 lines
1433 bytes
Witam
mam div-a on id imgPrv
zrobilem funkcje odczytujaca w onMouseOver

function showImagePreview(event)
{
 x=event.screenX;
 y=event.screenY;
 alert("X=" + x + " Y=" + y + " a=");
 imgPrv = document.getElementById('imgPreview');
 imgPrv.style.visibility = 'visible';
 imgPrv.style.position = 'absolute';
 imgPrv.style.top = y + 'px';
 imgPrv.style.left = x + 'px';
}

tyle, ze div ukazuje sie przesuniety o tyle o ile okienko jest przesuniete, 
chyba musze odczytac pozycje okna i odjac od pozycji myszy, ale nie mogle 
znalezc jak, spedzilem ponad godzine szukajac w internecie

prosze o pomoc 
Technical Details
Message-ID: <hiia46$1j8$1@inews.gazeta.pl>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.gazeta.pl!not-for-mail

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.gazeta.pl!not-for-mail
From: "Piotr Borowski" <birstall@gazeta.pl>
Newsgroups: pl.comp.lang.javascript
Subject: pozycja kursora myszy
Date: Tue, 12 Jan 2010 17:05:07 -0000
Organization: "Portal Gazeta.pl -> http://www.gazeta.pl"
Lines: 22
Message-ID: <hiia46$1j8$1@inews.gazeta.pl>
NNTP-Posting-Host: 87-194-175-41.bethere.co.uk
Mime-Version: 1.0
X-Trace: inews.gazeta.pl 1263315910 1640 87.194.175.41 (12 Jan 2010 17:05:10 GMT)
X-Complaints-To: usenet@agora.pl
NNTP-Posting-Date: Tue, 12 Jan 2010 17:05:10 +0000 (UTC)
X-MimeOLE: Produced By Microsoft MimeOLE V6.0.6002.18005
X-Priority: 3
X-Newsreader: Microsoft Windows Mail 6.0.6002.18005
X-User: birstall
X-MSMail-Priority: Normal
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit