Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 464
  • Last Modified:

Cursor X/Y location in Textarea (firefox only, pff to IE)

I need to get the X/Y (rows/columns) location of the cursor in a text area.

I'm building a spell checker and i'd like to point a big red finger to where they are typing.

i know you can use textarea.selectionStart and selectionEnd, but this is does not help if they've pressed enter a few times.

0
msmyers
Asked:
msmyers
  • 2
1 Solution
 
msmyersAuthor Commented:
I am looking for the X/Y in pixels from the top left of the text area. If they type 1000 lines and scroll down, i need to know the scrolled x/y. I am going to position an absolutely positioned div in the body at that position, and i have a way to get the X/Y of the textarea in relation to the whole document. I just need to get at the inside area.
0
 
Pravin AsarCommented:
0
 
msmyersAuthor Commented:
That solution has merit for IE. Is there a firefox similar way to do this? (Hopefully without using a fixed width font?)
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now