Answered
Hello,
I want to have a textfield, which's content should be checked, whether an search term, entered in an other textfield, is in it.
I'm not so good in scripting, can anybody give me a hint how to realize this function?
Here's a some code that searches "TextField1" for text entered into "TextFeild2"
var nPos = TextField1.rawValue.indexOf(TextField2.rawValue);
if(nPos >= 0)
app.alert("Text Found");
The indexOf function returns -1 if the text is not found.
Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script