Forum: Ruby on Rails Cursor position

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community 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)

Thanks,
Chris
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: http://www.hscripts.com/
scripts/JavaScript/cursor-position.php

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 http://www.htmlhelp.com/reference/html40/forms/input.html.

HTH.


On Wednesday, February 22, 2006, at 8:56 PM, blaimue wrote:
>Rails@lists.rubyonrails.org
>http://lists.rubyonrails.org/mailman/listinfo/rails


Cheers!
--Dave Teare
http://devlists.com - Email list management
http://palmsphere.com - Apps for your hand-held
This topic is locked and can not be replied to.