Hi all,
I am having trouble getting my dynamic stamp to get data recieved from a JS dialog pop up and replicating it on the stamp itself.
I have used AcroDialogs to create the layout but due to my weak JS knowledge I cannot seem to get the checkbox in the stamp to become checked or unchecked based on the JS dialog.
Are there any example stamps around where a checkbox has been successfully used?
I have been reading through these forums and others all day and I cannot seem to find an answer.
Many thanks,
Alex
http://www.acrobatusers.com/tutorials/2007/02/dynamic_stamp_secrets
Here are the steps:
1. Create a stamp with a check box that is set at runtime.
2. Use a standard popup box (could be a simple alert box) to set the check value at runtime.
3. Build a custom dialog and use it to set the check box.
I've seen people get hung up on all 3 of these steps. But I'll assume that because you've read and understand the article that your stuck on #3. If you are using AcroDialogs then you have a head start. When AcroDialogs generates the JavaScript code for the custom dialog it includes a usage example at the bottom of the script. Copy the entire AcroDialogs generated script into the calculation event of the field you're using to drive things on your dynamic stamp. This code needs to be inside the "if" that's used to qualify when the stamp code is run. Now all you have to do is to modify the example code for the dialog. Here's an example:
This is the code AcroDialogs writes out for a dialog with a single check box:
Notice that the check box value is acquired from the dialog with "JSADMDlg1.bChk1"
Here's how I'd modify the code to use with a dynamic stamp that has a check box named "MyCheck":
Thom Parker
The source for PDF Scripting Info
[url=http://www.pdfScripting.com]pdfscripting.com[/url]
The Acrobat JavaScript Reference, Use it Early and Often
[url=http://www.adobe.com/devnet/acrobat/javascript.php]http://www.adobe.com/devnet/acrobat/javascript.php[/url]
Then most important JavaScript Development tool in Acrobat
[url=http://www.pdfscripting.com/public/34.cfm#JSIntro][b]The Console Window (Video tutorial)[/b][/url]
[url=http://www.acrobatusers.com/tutorials/2006/javascript_console][b]The Console Window(article)[/b][/url]
Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script