Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail From: Dr J R Stockton Newsgroups: comp.lang.javascript Subject: Re: getSelection - method of document or window? Date: Sat, 16 Jul 2011 18:53:25 +0100 Organization: Home Lines: 17 Message-ID: <1aBEJaCVAdIOFwVX@invalid.uk.co.demon.merlyn.invalid> References: Mime-Version: 1.0 Content-Type: text/plain;charset=us-ascii Injection-Info: mx04.eternal-september.org; posting-host="UwYDIHu13GPq28RciNoAJA"; logging-data="3489"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/tfC1IR33MoT96yozdoEdGgbvBb6avPFA=" User-Agent: Turnpike/6.05-S (<5m6ExpQ4cssZqC9u+24bCHFtvs>) Cancel-Lock: sha1:O0hZYXctSWJHgaZjok5Bh3nBaYY= Xref: x330-a1.tempe.blueboxinc.net comp.lang.javascript:4235 In comp.lang.javascript message , Thu, 14 Jul 2011 21:22:21, RobG posted: >A general method for getting the selected text in a document (other >than inside input and textarea elements) is: If you should later wish to extend to using textarea, recall that there is at least one version of at least one browser in which it was necessary for "readonly" to be not set at the exact moment of executing the test grab. Web E&OE. -- (c) John Stockton, nr London, UK. ?@merlyn.demon.co.uk Turnpike 6.05 WinXP. Web - FAQ-type topics, acronyms, and links. Command-prompt MiniTrue is useful for viewing/searching/altering files. Free, DOS/Win/UNIX now 2.0.6; see .