Re: Question about someting similar to textrange in Mozilla/Firefox

Martin Honnen <[email protected]>
Newsgroups gmane.comp.mozilla.devel.xml
Organization Liberty Development
Message-ID <cugbq4$f8v6__43238.4879248731$1108063025$gmane$org@ripley.netscape.com>

Simon Engvall wrote:


> I have a table full of <div>elements with content. When I use IE I can use
> the method parentElement() in the textrange object to retrive witch element
> the cursor is at och the selected, is there something similar available in
> the Mozilaa/Firefoxworld?

I am not sure why you are asking in the XML group.
As for text selection in Mozilla, there are some APIs,
   var selection = window.getSelection();
gives you a selection object, its API is documented here
   <http://xulplanet.com/references/objref/Selection.html>
If you have further questions on that API then try the DOM group, 
followup-to is set.


-- 

	Martin Honnen
	http://JavaScript.FAQTs.com/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.