Solved

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

Posted on 2008-06-15
4
449 Views
Last Modified: 2013-12-07
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
Comment
Question by:msmyers
  • 2
4 Comments
 

Author Comment

by:msmyers
ID: 21790348
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
 
LVL 28

Accepted Solution

by:
Pravin Asar earned 500 total points
ID: 21797783
0
 

Author Comment

by:msmyers
ID: 21804008
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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Suggested Solutions

I've been asked to discuss some of the UX activities that I'm using with my team. Here I will share some details about how we approach UX projects.
Any business that wants to seriously grow needs to keep the needs and desires of an international audience of their websites in mind. Making a website friendly to international users isn’t prohibitively expensive and can provide an incredible return…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
Any person in technology especially those working for big companies should at least know about the basics of web accessibility. Believe it or not there are even laws in place that require businesses to provide such means for the disabled and aging p…

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now