From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/5924 Path: main.gmane.org!not-for-mail From: Alexander Presber Newsgroups: gmane.comp.tex.context Subject: Reposted : JavaScript Errors Date: Thu, 25 Oct 2001 11:31:40 +0200 Sender: owner-ntg-context@let.uu.nl Message-ID: <20011025113140.A1224@weisshuhn.de> NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="/9DWx/yDrRhgMJTb" X-Trace: main.gmane.org 1035396486 5775 80.91.224.250 (23 Oct 2002 18:08:06 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 23 Oct 2002 18:08:06 +0000 (UTC) Original-To: ntg-context@ntg.nl Xref: main.gmane.org gmane.comp.tex.context:5924 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:5924 --/9DWx/yDrRhgMJTb Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hello, excuse me for reposting this, but its really important I get Acrobat-JS to work without errors. Are the described errors 1) my bug 2) acrobats bug 3) contexts bug ? Can we somehow fix the "errors" (suppres the messages) that acrobat4 sees in up-001-s.pdf? Sincerely yours Aljoscha --/9DWx/yDrRhgMJTb Content-Type: message/rfc822 Content-Disposition: inline Date: Wed, 10 Oct 2001 20:24:40 +0200 From: Alexander Presber To: ntg-context@ntg.nl Subject: JavaScript Errors Message-ID: <20011010202440.A2087@weisshuhn.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i Hello, On opening the file up-001-s.pdf in Acrobat Reader I get 7 similar JS errors like JavaScript error in Validate Field script of field "sys::6" at line 1: Do_Check_Answer is not defined This seems to be a principal problem. When I try to attach a format action to a field e.g. : ... \setupfield [CheckSetup] [frame=off, width=8cm, height=2.8ex, background=color, backgroundcolor=gray, format=JS(check{date}) ] \definefield [date] [line] [CheckSetup] \startJSpreamble {Initialize} used now function check(name){ v = this.getField(name) ; if (v) { app.alert("Are you sure you mean "+v.value+" ?"); } } \stopJSpreamble \starttext \field[date] \stoptext I get basically the same error on startup, though it works afterwards. Also putting the function definition in an extra JScode block like \setupfield [CheckSetup] [frame=off, width=8cm, height=2.8ex, background=color, backgroundcolor=gray, format=JS(check{S{date}}) ] ... \startJScode{check} v = this.getField(JS_S_1) ; if (v) { app.alert("Are you sure you mean "+v.value+" ?"); } \stopJScode ... doesnt work. Acrobat finds the function definition now, but complains: JavaScript error in Format Field script of field "date2" at line 1: Operation failed. When the textfield is changed, the function works just fine. It seems, that on opening the document, Acrobat "tests" all functions or so ??? Can anyone help, please? Yours, Aljoscha --/9DWx/yDrRhgMJTb--