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

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top