Wrox Home  
Search P2P Archive for: Go

  Return to Index  

javascript_howto thread: How do I deselect text in a text box


Message #1 by "Chris Cote" <cotec@s...> on Mon, 18 Mar 2002 15:00:27
I have a form where you can select text and when you click a button, 
surrounds the selection with other text.  I then want to be able to 
deselect this text so the user can go on typing, but I don't know how to 
deselect the text in the text box.  I am currently using the 
selection.createRange to get the users selection.  I know that if I set 
the range to "" then I erase what was selected.  How do I just make the 
cursor go to the end of the selection?

Chris

  Return to Index