Adnan Siddiqi wrote:
Pardon me if I am not making any sense.What I want to know the
cordinates of selected text by user so that i can save/retrieve them
later.is It possible.I am lookig for both IE and Firefox solution.
What kind of selected text is that? For Mozilla/Firefox if the text
selected is in a text control (input, textarea) then those expose
input.selectionStart
input.selectionEnd
respetively
textarea.selectionStart
textarea.selectionEnd
If it is normal text not in a text control then check the selection
object API here
<http://www.xulplanet.com/references/objref/Selection.html#method_extend>
you get at that selection object by doing
var selection = window.getSelection();
then you would need to store
selection.anchorNode
selection.anchorOffset
selection.focusNode
selection.focusOffset
to be able to restore that selection later.
--
Martin Honnen
http://JavaScript.FAQTs.com/