Thread View: borland.public.intrabuilder.forms
1 messages
1 total messages
Started by tapsa
Mon, 07 Dec 1998 00:00
Search and replace problem
Author: tapsa
Date: Mon, 07 Dec 1998 00:00
Date: Mon, 07 Dec 1998 00:00
24 lines
1299 bytes
1299 bytes
I'm trying to use the stuff() method to search and replace text.
Here is my function:
function replace_onServerClick()
{
oldtext = this.form.oldtext.value;
newtext = this.form.newtext.value;
thetext = this.form.text1.text;
var tulos = new StringEx(thetext);
textlength=newtext.length;
n = tulos.indexOf(oldtext);
while ((n = result.indexOf(oldtext)) >= 0 ) ���
{
result.string = result.stuff(n, textlength, newtext);
}
this.form.text1.text = result.string;
}
It doesn't work. It is just like the example in the manual. (It didn't work
either).
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads