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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Old JavaBean 1

Status
Not open for further replies.

stormbind

Technical User
Mar 6, 2003
1,165
GB
Hi,

I'm trying to use the old JavaBeans that bundled with Netscape Navigator but documentation is thin on the ground :(

With a simple java textarea, how do you change the value of selected text?

If that is not possible, how do you change all the text in the textarea?

Thanks :)

----------
I'm willing to trade custom scripts for... [see profile]
 
Excellent! :D

Thanks. Don't know why I didn't find that page by myself. I owe you one ;)

----------
I'm willing to trade custom scripts for... [see profile]
 
This JavaBean is much more than I was expecting out of NN4 and I don't want to drop it, but I'm having a serious problems :(

getSelectedText() only works when the selection is on the first line of the textarea. If on any other line I get the following...

JavaScript Error: uncaught Java exception
java/lang/StringIndexOutOfBoundsException ("String index out of range: 38")


Any suggestions? :[

----------
I'm willing to trade custom scripts for... [see profile]
 
Just to update, I think I fixed it.

Counted the number of \n in substring(0,getSelectionStart()) and deducted the value from the selection positions.

----------
I'm willing to trade custom scripts for... [see profile]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top