From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/1469 Path: main.gmane.org!not-for-mail From: "Haseloff, Lutz" Newsgroups: gmane.comp.tex.context Subject: Re: calculate in forms Date: Tue, 28 Dec 1999 11:19:40 +0100 Sender: owner-ntg-context@let.uu.nl Message-ID: <0F3313EC125AD311981100105AB3A75D1EA5B5@N0795.mdf.fvbb.de> NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: text/plain X-Trace: main.gmane.org 1035392293 572 80.91.224.250 (23 Oct 2002 16:58:13 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 23 Oct 2002 16:58:13 +0000 (UTC) Cc: ntg-context@ntg.nl Original-To: Hans Hagen Xref: main.gmane.org gmane.comp.tex.context:1469 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:1469 Hi Hans, Hi all, > \startJSpreamble {Calculate} used now > function Calculate () > { v = getField("Ergebnis") ; v.value = 0 ; > v.value += getField("Summand1").value ; > v.value += getField("Summand2").value } > \stopJSpreamble This treats the values like strings if they contain other seperators as a dot I changed your solution to: \startJSpreamble {Calculate} used now function Calculate () { v = getField("Ergebnis") ; v.value = 0 ; v.value += AFMakeNumber(getField("Summand1").value) ; v.value += AFMakeNumber(getField("Summand2").value) } \stopJSpreamble and this works very nice for me. Thank you very much Happy New Year Lutz