[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Datatype Conversion
Hello
This is an example based on your page and using an intemediate variable:
--------------
<HTML>
<HEAD>
<SCRIPT LANGUAGE="LiveScript">
function computeField(form) {
if (form.ent1.value == "") {
form.ent1.value= 0
}
if (form.trav1.value == "") {
form.trav1.value= 0
}
total = 0 + form.ent1.value + form.trav1.value
form.total1.value = total
}
</SCRIPT>
<TITLE>Expense Report</TITLE>
</HEAD>
<BODY>
<FORM method=POST ACTION="/cgi-bin/parse.pl">
<INPUT TYPE=TEXT NAME=ent1 SIZE=8 onChange=computeField(this.form)>
<INPUT TYPE=TEXT NAME=trav1 SIZE=8 onChange=computeField(this.form)>
<INPUT TYPE=TEXT NAME=total1 SIZE=8>
</body>
--------------
At 09:38 11/01/96 -0500, you wrote:
>Hi,
>I appreciate the help, but it didn't work. . . I just got a "0" prepended
>to that string. Any other ideas? much appreciated.
>
>Guy
>
Regards
--
Lourdes Yero
E-mail: lyero@dino.conicit.ve
PGP fingerprint: 77 B8 67 FE EC 5E 47 D9 62 94 4D D8 0C F8 F8 02