<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 5.50.4522.1800" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Thomas,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2> The answer to your problems is
the parseInt() function, e.g.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>var total = parseInt(formname.field1name.value) +
parseInt(formname.field2name.value);</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2> Form data is treated as strings
unless you specify otherwise.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Cheers,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Peter</FONT></DIV>
<BLOCKQUOTE dir=ltr
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>
<A title=TMccoy@city.newport-beach.ca.us
href="mailto:TMccoy@city.newport-beach.ca.us">McCoy, Thomas</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A title=javascript@LaTech.edu
href="mailto:'javascript@LaTech.edu'">'javascript@LaTech.edu'</A> </DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Wednesday, June 27, 2001 1:04
PM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> [Javascript] 1+1+1=111?</DIV>
<DIV><BR></DIV>
<DIV><FONT face=Arial size=2><SPAN class=867005917-27062001>Hello
all!</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=867005917-27062001></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN
class=867005917-27062001></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=867005917-27062001>I am trying to
create a form that uses client-side Javascript to sum numerical
data.</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=867005917-27062001></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=867005917-27062001>The form has six
blanks where numbers are entered. The seventh box will display
the mathematical total of the numbers entered in the six
boxes. So far, I can only get the 7th box to either add the html tags
together (not what I want) or compile the numbers in the box (if the
first six contain 1,2,3,4,5,6... I get 123456 in the Total box). Any
ideas, before I pull all my hair out?</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=867005917-27062001></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN
class=867005917-27062001></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2>Sincerely,</FONT></DIV>
<DIV><FONT face=Arial size=2>Thomas
McCoy</FONT></DIV></BLOCKQUOTE></BODY></HTML>