Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   HTML (http://www.velocityreviews.com/forums/f31-html.html)
-   -   how to show x y coordinates of the cursor (http://www.velocityreviews.com/forums/t163943-how-to-show-x-y-coordinates-of-the-cursor.html)

wai-tak sit 01-15-2006 09:27 AM

how to show x y coordinates of the cursor
 
can anybody tell me how can the webpage shows the x y coordinates of the
cursor when I click on the web page?

Thanks in advance.


Roy Schestowitz 01-15-2006 10:38 AM

Re: how to show x y coordinates of the cursor
 
__/ [wai-tak sit] on Sunday 15 January 2006 09:27 \__

> can anybody tell me how can the webpage shows the x y coordinates of the
> cursor when I click on the web page?
>
> Thanks in advance.


This can become very obtrusive, but there you go:

http://javascript.internet.com/page-...ordinates.html

Hope it helps,

Roy

--
Roy S. Schestowitz | Useless fact: Florida is bigger than England
http://Schestowitz.com | SuSE Linux | PGP-Key: 0x74572E8E
10:35am up 35 days 17:46, 13 users, load average: 1.06, 1.23, 1.21
http://iuron.com - next generation of search paradigms

Philip Ronan 01-15-2006 12:31 PM

Re: how to show x y coordinates of the cursor
 
wai-tak sit wrote:

> can anybody tell me how can the webpage shows the x y coordinates of the
> cursor when I click on the web page?


You might find that a server-side image map does what you want:

<http://www.w3.org/TR/html4/struct/objects.html#h-13.6.2>

--
philronan [@] blueyonder [dot] co [dot] uk


wai-tak sit 01-15-2006 02:38 PM

Re: how to show x y coordinates of the cursor
 
Dear Roy,

Thanks for help!

What if I want to show the xy coordinates in tooltips whenever the mouse
land over.

Thanks again.

Wai Tak

==================================


Roy Schestowitz wrote:

> __/ [wai-tak sit] on Sunday 15 January 2006 09:27 \__
>
>
>>can anybody tell me how can the webpage shows the x y coordinates of the
>>cursor when I click on the web page?
>>
>>Thanks in advance.

>
>
> This can become very obtrusive, but there you go:
>
> http://javascript.internet.com/page-...ordinates.html
>
> Hope it helps,
>
> Roy
>



Toby Inkster 01-16-2006 01:39 AM

Re: how to show x y coordinates of the cursor
 
wai-tak sit wrote:

> can anybody tell me how can the webpage shows the x y coordinates of the
> cursor when I click on the web page?


You're opening a Pandora's box here!

Say I'm viewing a web page like this:

__________________________
| |
| Document |
|__________________________|
|x |
| Viewport |
| |
| |
| |
| |
| |
| |
|____________________________|
| |
| |
|__________________________|


That is, I've opened you web page and scrolled down a little way, so that
the top of your document has scrolled off the top of my screen.

If I click in the position marked "x", how far down the page am I? Zero
lines, because I'm at the top of my viewport; or four lines, because I've
scrolled down three lines of your document?

The problem is that when you use Javascript to determine the mouse
position, some browsers report the position relative to the viewport, and
some relative to the document.

Read more here:
http://www.evolt.org/article/Mission...335/index.html

--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact


Thundergo 09-09-2006 08:16 PM

okay srry to be total noob about this but how do i install the script into the web page so i can see x y cordnents on the web page srry again for this being so noobish


All times are GMT. The time now is 12:36 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.