Previous | Next | (P-PDF) Beginners
Topic: Re: Compare Java Script (Via Email)
Conf: (P-PDF) Beginners, Msg: 23078
From: prodok
Date: 6/28/2001 08:37 PM
f and g are field objects per your definition in lines 1 and 2.
In line 5 you suddenly assume that f and g are arrays...
Strange...
Max Wyss
PRODOK Engineering
Low Paper workflows, Smart documents, PDF forms
CH-8906 Bonstetten, Switzerland
Fax: +41 1 700 20 37
e-mail: mailto:max@prodok.com
http://www.prodok.com
[ Building Bridges for Information ]
______________________
>Could someone shed some light on what I am doing wrong. I am very
>new to Java Script.
>
>var f = this.getField("Q1");
>var g = this.getField("Q2");
>event.value = f.value - g.value;
>function compare (f,g) {
>if (g[0] > f[0]) return 0;
>}
>
>
>The error message I keep getting is:
>
>TypeError: g has no properties
>
>My Q2 field is set to only except numbers.
>I don't know what else to try.
>