frylock 0 Newbie Poster

I'm using Adobe Acrobat version 5.0, and even the simplest string functions aren't working. Let's say I have a field called "name" and I want to get the second letter in that field. The following code should work unless someone slipped a narcotic into my morning coffee:

var f = this.getField("name");
event.value = f.substr(1,2);

This should do it. In the alternative, to make things even simpler, how about getting the length of the name field?

var f = this.getField("name");
event.value = f.length();

In both cases, my compiler says that there is no such function as f.substr or f.length.

What's going on? What am I doing wrong? Thanks in advance.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.