Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

createRange creating problem in Netscape 6

Status
Not open for further replies.

RemoteSilicon

Programmer
Feb 13, 2001
45
GB
Hi guys!

I have written a code that checks whether the user has selected any words in a text area. The syntax is :

document.selection.createRange().text

It works perfectly well in IE but I also have to make it work for Netscape 6. Can anyone help me in writing a compatible code.
 
Thanks for replying.

What I am trying to do in my code is :

1. Onclick of a button, selected value from a textarea is get.

2. Text is added on the start and end of selection

3. This modified text is replaced with the old selection into the whole text

I tried to use the syntax mentioned in the url you gave but when I click the button, the selection value becomes null.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top