Forum: Ruby on Rails Cursor position

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
D16d4625d7584ca6a7c909416429f81f?d=identicon&s=25 blaimue (Guest)
on 2006-02-22 20:56
How can I get the cursor position relative to the page, and store it in
a variable? (Preferably without using javascript)

5d15c6821f3c3054c04b85471824ba7c?d=identicon&s=25 Dave Teare (Guest)
on 2006-02-23 01:29
(Received via mailing list)
Google gave this as one of the first hits:

I don't see how you can do this without javascript, unless your talking
about the click position on a submit image:

"The image input type specifies a graphical submit button. The SRC
attribute must be included to specify the URI of the image. The ALT
attribute should be used to give replacement text for those not loading
images. ALT is a new addition in HTML 4.0; many browsers rely on either
the NAME or VALUE attribute as alternate text, so authors should use all
three attributes for the same purpose where possible. The topic of
graphical submit buttons for text users is discussed in detail in the
article INPUT TYPE=IMAGE for text users?.

"When the graphical submit button is clicked, the coordinates of the
click are sent with the form submission as name.x=x-value and
name.y=y-value where name is the value of the NAME attribute, x-value is
the click's pixels from the left of the image, and y-value is the
click's pixels from the top of the image. The USEMAP attribute combined
with TYPE=image defines a client-side image map that can be used with
client-side scripting, but this method is poorly supported. The USEMAP
attribute gives the URI of the defining MAP."

Taken from


On Wednesday, February 22, 2006, at 8:56 PM, blaimue wrote:

--Dave Teare - Email list management - Apps for your hand-held
This topic is locked and can not be replied to.