Find/Replace woes
Adrian Williams
adrian at clubtype.co.uk
Thu Nov 16 12:22:08 EST 2006
hello list,
I have one field "edtText" that contains text to be found/replaced.
One field for User to enter text to be found along with a button.
One field for User to enter text the replace text along with a button.
All are on the same card.
The logic and syntax look correct to me, but nothing gets replaced in
the edtText field.
It does not generate an error. Anyone have any ideas?
SCRIPT: FIND BUTTON
on mouseUp
set text of field "edtReplace" to ""
put text of field "edtFind" into tFindText
find string tFindText in field "edtText"
end mouseUp
SCRIPT: REPLACE BUTTON
on mouseUp
get the htmlText of field "edtText"
replace text of field "edtFind" with text of field "edtReplace" in it
set the htmlText of field "edtText" to it
end mouseUp
Thanks,
Adrian
______________________
Club Type
http://www.clubtype.co.uk
adrian at clubtype.co.uk
More information about the use-livecode
mailing list