I am developing an underline bookmarklet. It was designed to work in any text box but it only seems to work in Yahoo mail. I have no idea why. I have included it below. Line breaks and comments have been added. In reality it is one line that goes in the address of the bookmark. When it works inputString has a value. When it doesn't work (which is everywhere but Yahoo mail) inputString is blank.
It is available for testing at http://dmmarks.com/bookmarklets.html
/* function to convert HTML entities to text */
/* get the selected text */
inputString=document.getSelection().getRangeAt(0); <----- problem seems to be here
/* convert to string so length will work */
/* add the underline charaters */
/* replace the selected text */