In comp.lang.javascript message <Xns98FDF13CA7CB7rrrrffffttttnospamho@21
6.168.3.44>, Sun, 25 Mar 2007 04:42:52, Jim Land
<rr**********@hotmail.composted:
>"EJ" <jo********@hotmail.comwrote in news:1174794390.053055.114290
@y66g2000hsf.googlegroups.com:
> document.forms['price'].elements['amount'].value = cpusxd + shpsxd;
Sorry. This should work:
document.forms['price'].elements['amount'].value = +cpusxd + shpsxd;
The + in front of cpusxd converts from string to number.
You need to test not only your code but also your "corrections".
That should be ... = +cpusxd + +shpsxd; since + between Number and
String converts the Number to String and concatenates.
It's a good idea to read the newsgroup c.l.j and its FAQ. See below.
--
(c) John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v6.05 IE 6
news:comp.lang.javascript FAQ <URL:http://www.jibbering.com/faq/index.html>.
<URL:http://www.merlyn.demon.co.uk/js-index.htmjscr maths, dates, sources.
<URL:http://www.merlyn.demon.co.uk/TP/BP/Delphi/jscr/&c, FAQ items, links.