PDF-Forms is a service provided by PDFzone.com | http://www.pdfzone.com/ __________________________________________________________________
If this can be limited to the time the document has been opened (which I think is a viable assumption), it can be implemented relatively easy. Actually, it would be the same approach as for any run-only-once-when-the-document-opens actions.
On document level, you define a variable and assign it a specific value. When you run the PageOpen script, you check for that value. If it has the value of the document level definition, you do your tasks, and as last step of that activity, you change this value. When you get back to that page, that value has changed, and you will not run this again.
This should already do it. The idea is to not use a field, but a variable you keep in memory. Unless you reset that variable using a specific reset function, it will remain as is, as opposed to the field value which would get reset.
Hope, this can help.
Max Wyss PRODOK Engineering Low Paper workflows, Smart documents, PDF forms CH-8906 Bonstetten, Switzerland
Fax: +41 1 700 20 37 or +1 815 425 6566 e-mail: mailto:[EMAIL PROTECTED] http://www.prodok.com
[ Building Bridges for Information ]
______________________
Shameless Plug:
My next conference appearances and workshops:
* PDFConference 2003 in Anaheim, CA, November 9 to 13, 2003 (http://www.pdfconference.com)
* And, as always, available for on-site workshops/tutorials/consulting.
_________________________
I have a PageOpen Script, which should only run through oncce, because it has, among other things, the task to add or remove (in another form) a template, hidden fields, which are not necessary after the time, that the script run through and so on. I need a possibility, that the script only can work once, and then it should be blocked.
My idea to deal with the problem was the following, I added a text field as a counter with the name "Anzahl" and the basic value 0, to deal with the problem, and added a request at the beginning of the script:
var Page = this.getField('Anzahl'); PageOpen = Page.value;
if(PageOpen < 1) {
PageOpen++;
....
}
but that's not the best solution. Every time I open the form make changes in the form or the xfdf document, the script runs through, the fields are hidden, the value in the text field must relocated and so on before I can save the forms and the xfdf-contents, in which the value is also included. Can I solve the problem with another solution?
To change your subscription: http://www.pdfzone.com/discussions/lists-pdfforms.html
