HighDots Forums  

numeric help

JavaScript discussion (multi-lingual) JavaScript discussion (alt.comp.lang.javascript)


Discuss numeric help in the JavaScript discussion (multi-lingual) forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Rob@
 
Posts: n/a

Default numeric help - 08-30-2004 , 07:04 AM






Im trying to add two form fields as a number its not working, its just
adding them together as a string and not performing mathmatics on them

any suggestions

my code (it maybe wrong)

x = form1.cost1.value;
y = form1.cost2.value;
var x;
var y;
form1.grandtotal.value = (x + y)


cost1 & cost2 both being my fields within the form

Cheers

Rob



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.