Topbar
Topbar
Sign in
|
Join
|
Client Center
Home
Products
Client Center
Contact
Purchase
Support forums
»
Products
»
Cute Editor for .NET
»
Anyway to get the the selected text with Javascript
Anyway to get the the selected text with Javascript
09-15-2005, 1:39 PM
cmessineo
Joined on 09-15-2005
Posts 9
Anyway to get the the selected text with Javascript
Reply
Quote
I am trying to have a user enter an ISBN and then select it and then I do some remote scripting so I can popluate the editor with book data for the isbn.
This line of javascript is failing in both IE and Netscape/Firefox
if (e.setSelectionRange) {
strText = e.value.substring(e.selectionStart, e.selectionEnd);
}
else {
strText = document.selection.createRange().text;
}
This works with a simple textarea html forms control
Thanks
View Complete Thread