Planet PDF Forum Archive

Planet PDF  ForumThe page you are viewing is part of our 160,000 page discussion forum archive. See below for PDF-related discussions spanning 1999-2008. To ask questions and get help, head to the live Planet PDF Forum.


How to search this archive. The quickest way is to use the filters on our Advanced Search page so that only archive pages are included in the results.


Previous | Next | (P-PDF) JavaScript


Topic: Adobe 5.05 Script vs newer versions -- HELPP!, 1 Attachments
Conf: (P-PDF) JavaScript, Msg: 157207
From: ghloid
Date: 12/30/2006 07:37 AM

Hello all,

I'm desperately seeking some help with a type of validation I'm
using on my PDF forms. I'm using Acrobat 5.0 to put on all the fields and javascripting. There must be something in A 5.0 in terms of the javascript evaluation, because my form works fine in that version, but not the newer 7.08 version (or probably higher).

I have attached a copy of the file to this posting.

The basics behind a user using this form are that the user loads the form up in Adobe (Reader or Acrobat should be fine), and they go to a page where they can type information. When the user clicks a button marked "Start Working" the form is enabled for typing (set the fields off of 'read only' status). That triggers a check box to be marked off 'Yes' (the chkPg field on every typeable page),
and the Start Working button disappears to reveal the Stop Working button. Also, a field is displayed that shows the PDF is ready for validation and typing. These events will trigger whether or not validation happens when a user clicks away from the page (forward or back). When the user does try to leave the current page, and things aren't typed in that should be typed in, the validation begins.

There are 3 basic document level scripts that validation works on.

1. The ChkCurrentPg script fires at the opening of any new page. That will determine if the page should be validated, or it shouldn't be because the user hasn't finished filling in data from a previous page. That function is really dependant upon the "chkStopChk" field. If this field is 'Off' then the page is marked for validation. If not, the user must have forgotten something on a previous page, and the page is NOT marked for validation.

2. The ChkPgValidation script is fired during a page close action and it returns whether or not to do validation as well. If this returns true (or 'CheckIt' from the function), then the page validation begins.

3. The StopChk function works when a page has not passed validation and the "chkStopChk" field needs to then be marked "Yes". This will stop further page validation, and allow for the user to return to the previous page to fill in the required info (via a setFocus command).

When the user has successfully completed a page, the validatedpg function fires to mark the page as validated (changed the text in the display field on the page, and sets off the "chkStopChk" button).

A user can also stop page validation at any time by click the "Stop Working" button to print the form, or just stop working for the day.

One final function that is built in is the FormFldVal function which works on a custom keystroke event of every text field. That's in place if a user returns to a page that was previously validated, and they want to change information (delete the text there or something).

At any rate, this works PERFECTLY in Adobe 5.05. When I try it in AR 7.08, it doesn't look like things are firing in order correctly. If you try working on a page, and you leave something blank to go to another page, the validation kicks in slowly and for whatever reason, the following page is marked for validation (which shouldn't happen), and you get caught in a terrible setFocus loop for both pages.

I worked very hard to prevent that in Adobe 5.05, but my checks and balances don't seem to work for the newer versions.

Any help on this is GREATLY appreciated.

Thank you!!!!

Click to open!321AppPacket.pdf
Ghloid's Page Validation Example (411,775 bytes)


PDF In-Depth Free Product Trials Ubiquitous PDF

Pitstop Pro

Now graphic arts professionals have even broader and more expert control over their PDF documents. With...

Download free demo

ARTS PDF Aerialist

The ultimate plug-in for Adobe Acrobat and #1 selling product at PDF Store. Advanced splitting, merging,...

Download free demo

Ubiquitous PDF: 2009 IRS income tax forms available for download

With less than a month to go until Americans will be scrambling to file their 2009 tax paperwork. Luckily, printable PDF versions of forms such as the 1040 can be downloaded for free from the IRS website.

March 18, 2010
Search Planet PDF
more searching options...







Download PDF Creator

PDF Resources
Platinum Sponsor
Create & Edit PDF - Nitro PDF Software

ARTS PDF

Silver Sponsors

PDF-Tools QuickPDF: The Unrivaled PDF Developer Toolkit

Get Nitro PDF Professional
Featured Product

NITRO PDF Professional

Built from the ground up, the perfect desktop PDF product for business and enterprise. Nitro PDF Professional has an uncompromising feature set so you can create, combine, edit, collaborate on and...

Featured Event

No upcoming events

PDF Store Categories