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.

msmyersAsked:
Who is Participating?
 
Pravin AsarPrincipal Systems EngineerCommented:
0
 
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
 
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.