These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Run a script when document opens

Mark Green
Registered: Mar 29 2009
Posts: 19

Thank God for this forum !!!!

I am trying to add a script to a document that will run as soon as it opens.

I have put a form field in the document that states that "This doucment need Javascript enabled to run properly".

When the document opens I want to run a script that hides the form field.

This means if Javascript is enabled the form field will not appear, If javascript is not enabled the form field stays visble and informs the user they must enable it.

I need the solution to be totally encapsulated within the document eg; folder options are not an option as I am sending the doucments out to clients with varying setups.

I have looked at Doc/Open but cannot work out how to get it working for me.

Thanx in advance to anyone who can help

Mark Green

My Product Information:
Acrobat Pro 8.1, Windows
try67
Expert
Registered: Oct 30 2008
Posts: 2398
You can also use the addScript method of a Document object. Look in the JavaScript reference files for more info.

- AcrobatUsers Community Expert - Contact me personally at try6767 [at] gmail [dot] com
Check out my custom-made scripts website: http://try67.blogspot.com