Previous | Next | (P-PDF) Beginners
Topic: Performing Calculations upon User Input
Conf: (P-PDF) Beginners, Msg: 23509
From: lpetroni
Date: 7/6/2001 04:55 PM
Marcie:
Try to use this code:
var theField = this.getField("hours");
var theValue = this.getField("percent");
theValue.value = (theField.value)/40;
Load the code in the custom calculate javascript of
the field "percent".
One other thing - you used this code but said that
your fields were named "Hours" and "Percent" with
the first letter in capital - I believe that this is
different in javascript from "hours and "percent"
var theField = this.getField("hours");
var theValue = this.getField("percent");
lpetroni
compasso arte design
>On my form I have two
>fields--Hours and Percent. I
>want the percent to auto
>populate based on the hours
>the user inputs. The percent =
>hours/40. I entered this code
>in my hours field as a JS
>action On Blur event:
>
>
>I get this error statement.
>
>TypeError: theField has no
>properties
>
>Does anyone know what I did
>wrong and how to fix it?