Getting Error 'indexOf is not a function' - Acrobat X
Hello,
I have a document level javascript that is looking for character strings to determine a result.
Why would it throw this error?
function webaddress() {
var one = this.getField("CompanyName");
var two = this.getField("WebAddress");
var three = this.getField("dealerCSZ");
var n = three.indexOf("MN,");
var n1 = three.indexOf("IN,");
var n2 = three.indexOf("OH,");
// evaluate address for proper name
if (n.value>=1)
{
one.value='TRUCK COUNTRY USED TRUCK CENTER';
two.value='www.truckcountry.com';
}
else if (n1.value>0 || n2.value>0)
{
one.value='STOOPS FREIGHTLINER - QUALITY TRUCKS';
two.value='www.stoops.com';
}
else
{
one.value='TRUCK COUNTRY';
two.value='www.truckcountry.com';
}
}
webaddress(); // call my function
