Solved

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

Posted on 2008-06-15
4
452 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

How our DevOps Teams Maximize Uptime

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us. Read the use case whitepaper.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Learn by example how to specify CSS selectors for Selenium WebDriver test automation software.
Does your audience prefer people in photos or no people? How can you best highlight what you’re selling? What are your competitors doing, and what can you do that is different and unique from them?  Continue reading to learn how to make your images …
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
This Micro Tutorial will demonstrate how nuggets on the Web are formatted by using Chrome Developer Tools. These tools would not only view the site's CSS but it can also modify it and save the CSS to use on your own site.

856 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