From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/1455 Path: main.gmane.org!not-for-mail From: "Haseloff, Lutz" Newsgroups: gmane.comp.tex.context Subject: calculate in forms Date: Mon, 20 Dec 1999 15:48:21 +0100 Sender: owner-ntg-context@let.uu.nl Message-ID: <0F3313EC125AD311981100105AB3A75D1EA563@N0795.mdf.fvbb.de> NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: text/plain X-Trace: main.gmane.org 1035392280 439 80.91.224.250 (23 Oct 2002 16:58:00 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 23 Oct 2002 16:58:00 +0000 (UTC) Original-To: ntg-context@ntg.nl Xref: main.gmane.org gmane.comp.tex.context:1455 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:1455 Hi all, Hi Hans, I want to prepare a form with calculating fields. My file looks like this: ..... \startJScode{Format} AFNumber_Format(2, 3, 0, 0, "", true); \stopJScode \startJScode{Keystroke} AFNumber_Keystroke(2, 3, 0, 0, "", true); \stopJScode \startJScode{Calculate} AFSimple_Calculate("SUM", new Array ("Summand1", "Summand2")); \stopJScode .......%%% I use the Scripts from AForm.js because my JS programming is poor \setupfield [ErgSetup] [frame=on,width=8cm,height=4ex,format=JS(Format),afterkey=JS(Keystroke),calc ulate=JS(Calculate)] ........ \hbox to 11cm{Summand 2:\hfill \field[Summand2]} \hbox to 11cm{Ergebnis :\hfill \field[Ergebnis]} ........... All scripts are at the right places in the pdf-file (tested with Acrobat) and the format and afterkey scripts work very fine. Only the calculation does not work. Is it possible that the missing "/CO [...]" near /Fields is the Reason? In the PDF Specification the "Calculate Order" is required. Greetings Lutz