•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the JavaScript / DHTML / AJAX section within the Web Development category of DaniWeb, a massive community of 426,013 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 1,614 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JavaScript / DHTML / AJAX advertiser: Lunarpages Web Hosting
Views: 430 | Replies: 0
![]() |
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.
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.
Last edited by frylock : Jul 13th, 2008 at 4:52 pm.
![]() |
•
•
•
•
•
•
•
•
DaniWeb JavaScript / DHTML / AJAX Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Similar Threads
- onBlur event and focus in Adobe Acrobat 8 (Java)
- Text field length validation in Acrobat 8 (JavaScript / DHTML / AJAX)
- Calling a javascript function from C# (C#)
- learning php (PHP)
- database application on cd (JavaScript / DHTML / AJAX)
- Page Cannot Be Displayed & javascript:doNetDetect() Errors (Viruses, Spyware and other Nasties)
- Hijack this log (Viruses, Spyware and other Nasties)
Other Threads in the JavaScript / DHTML / AJAX Forum
- Previous Thread: Problem with page link.
- Next Thread: Onchange


Linear Mode