Y-Position of Cursor

Discussion in 'Javascript' started by Sascha Crescionini, Apr 5, 2004.

  1. hello ng

    can someone please tell me, how I get the Y-position of the curser
    when I click into a formfield (textbox, selectbox)?

    thanx!
    sascha
     
    Sascha Crescionini, Apr 5, 2004
    #1
    1. Advertising

  2. Sascha Crescionini wrote:

    > hello ng
    >
    > can someone please tell me, how I get the Y-position of the curser
    > when I click into a formfield (textbox, selectbox)?
    >
    > thanx!
    > sascha
    >
    >


    It depends on the Y coordinate you want, and in which browser:

    IE 4+ Event Model:

    window.event.offsetY -- Y coord in element
    window.event.clientY -- Y coord in wincow
    window.event.screenY -- Y coord on the screen

    Netscape 6+ Event Model: (event e)

    e.layerY -- Y coord in positioned element
    e.pageY -- Y coord in page
    e.screenY -- Y coord in screen

    Other Models, I dont follow them.

    Brian
     
    Brian Genisio, Apr 5, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Matt Tapia

    Insert text at cursor position

    Matt Tapia, Nov 26, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    543
    Chris Taylor
    Nov 26, 2003
  2. Matt Tapia

    Insert text at cursor position...still

    Matt Tapia, Dec 1, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    611
    General Protection Fault
    Dec 1, 2003
  3. =?Utf-8?B?VG9tYXMgS2VwaWM=?=

    Changing DEFAULT cursor to WAIT cursor in ASP

    =?Utf-8?B?VG9tYXMgS2VwaWM=?=, Apr 5, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    2,338
    Bruce Barker
    Apr 5, 2005
  4. invy
    Replies:
    4
    Views:
    397
    CBFalconer
    Dec 28, 2006
  5. dmaziuk
    Replies:
    3
    Views:
    593
    Chris Gonnerman
    Jan 25, 2011
Loading...

Share This Page