473,379 Members | 1,355 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,379 software developers and data experts.

JavaScript in Adobe Acrobat 8

2
I really need help on this one.
The problem is quite simple-
I've got many text fields that user has to fill. The thing I can't figure out is how NOT to allow go to next field if the length of current field's value is less than 6 digits. I tried something like this, but I know almost nothing about javascript:

Expand|Select|Wrap|Line Numbers
  1. var lg = getField("From[0]").value.length;
  2. if(lg<6 && lg>0){
  3. getField("From[0]").setFocus();
  4. }
And I've put this in onBlur event... Could anybody help me?
Feb 13 '08 #1
3 2108
BigDaddyLH
1,216 Expert 1GB
ECMAScript (sometimes called JavaScript) is unrelated the programming language Java, so I have moved your post to the correct forum.
Feb 13 '08 #2
Hmmmm.... Generally you use javascript in PDF forms to show calculations.

validation is generally handled seperatly......... I use "Adobe Designer" to create forms and under "Properties", "Object", "Value" there's a drop drown for "type" of which lists, "User Entered-Optional [default]", "User Entered-Recommended", "User Entered-Required"... setting it to the latter will blcok a form submission if the field is blank ... that's generally how you control that sort of thing in pdf forms.

IMO: It's never nice to control your users' input onBlur/Focus -- if they try and submit a blank form, stop them -- but let 'em have a little freedom when filling it out.
Feb 14 '08 #3
Wiizl
2
I'd love to leave them freedom, but this 6 digit limitation is what my boss wants.. I've no choice,.. and no ideas also..
Feb 14 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Ian Sedwell | last post by:
Hi guys I am writing a Javascript routine to check for the presence and version of an Adobe Acrobat PDFViewer on the user's machine. No problem with any browser on the Mac, no problem with any...
5
by: Don Lancaster | last post by:
I am conjuring up some simple JavaScript animation routies that work entirely WITHIN Acrobat .PDF files. They work very well but they are waay too fast! And are also CPU speed dependent. I...
5
by: Picco | last post by:
How can i set a asp variable with a value in Javascript? JS Code: <script language="JavaScript" type="text/javascript"> <!-- if (acrobat.ver5) { // if Acrobat 5.0 or newer is installed,...
2
by: Andy W | last post by:
I'm wanting to automate Adove Acrobat Reader using Com thru Python and win32com, but i can't find any documentation for the Adobe stuff? Has anyone done anything with Acrobat COM ? I've searched...
3
by: Hank Reed | last post by:
I have been using the ShellExecute command for about a year to print out a list of PDF files. It's a great capability. Of course, the documents are actually printed by the Adobe application. We...
6
by: jdph40 | last post by:
We recently had to upgrade the computers in our company. Now our office's website on our company intranet no longer recognizes reports saved in snapshot format. We get an error message that the...
0
by: Per | last post by:
Is there anyone who's been able to program the new Adobe Acrobat Javascript (7.05) using Visual Basic in Access 2003? I have downloaded the documentation from Adobe's website (Programming Acrobat...
3
by: frenchy | last post by:
I am getting this error in Adobe after struggling with a 'submit' button on an acrobat form that is in production and all the other appdev people in the office are NOT having a problem with. It...
1
by: Stinky Pete | last post by:
Hi, With thanx to the group and suggestions to review other news sites, I've got some code that allows me to open Adobe from Access. As I am new at this, I still need some help though. The...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.