Get non selected text from a textbox in IE
===

I'm trying to get the non selected text in an Input Text element using IE8, I tried [this][1] and was really helpfully, but in the case of the text wasn't selected the function returns the index of start and end of the string.

How can I get the non selected text of the input text element or how can I know when there isn't text selected?


Using jQuery would be helpfully too.


  [1]: http://stackoverflow.com/a/235419/1301872