Y-Position of Cursor

  • Thread starter Sascha Crescionini
  • Start date
S

Sascha Crescionini

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
 
B

Brian Genisio

Sascha said:
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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,062
Latest member
OrderKetozenseACV

Latest Threads

Top