Click to See Complete Forum and Search --> : How can i detect the cursor position insid of an editable DIV?


stoodder
12-29-2003, 10:33 AM
well im currently making a wysywig editor with javasript, what i have is 2 editors in one sort of, one is the WYSYWIG and the other is the hard code html. all i need to know is how i can identify where the blinking cursor is inside of my WYZYWIG editor, i tried using caretPos but unfortunatly i cant use that with the getElementById()funciton, lol so pleae if you could help me hat would be great, if you need to see my code id be glad to show it to you, its a liitle messy lol i was planning on going back and fixing it up once i was done. but anyway thanx for readin gthis pot, would be great if you could help.

fredmv
12-31-2003, 02:47 AM
http://www.mozilla.org/editor/midasdemo/

danielnyc
07-06-2007, 04:54 PM
can detect cursor position in text field using javascript?
ie i have a text field that will have codes in it like

303.8765.9876

(1)i need to be able to detect that the cursor in the '8765' area or the '9876'
(2) then based on position, display some related information in another div layer

I need help with (1). is this possible please?

ideas strongly welcomed & appreciated?
Daniel