pthompson2002
08-29-2002, 09:38 AM
I am having trouble displaying the actual position of the caret within a text area. When the user clicks within the text area I would like the message "You are at position : xx" to be displayed where xx is the position.
I am storing the Caret using:
function storeCaret(textE1) {
if (textE1.getCaretPosition)
textE1.caretPos = document.selection.createRange().duplicate();
}
But I don't know how to display it, I have been to the URL
www.faqts.com/knowledge_base/view.phtml/aid/1052/fid/130
But it didn't really help me as I wasn't sure what changes i need to make to ge tit to display the caret instead of insert at the caret. Can anyone point me in the right direction.
Cheers Pete
I am storing the Caret using:
function storeCaret(textE1) {
if (textE1.getCaretPosition)
textE1.caretPos = document.selection.createRange().duplicate();
}
But I don't know how to display it, I have been to the URL
www.faqts.com/knowledge_base/view.phtml/aid/1052/fid/130
But it didn't really help me as I wasn't sure what changes i need to make to ge tit to display the caret instead of insert at the caret. Can anyone point me in the right direction.
Cheers Pete