> Please excuse me if I am posting in wrong NG.
>
[quoted text clipped - 11 lines]
> I know this should be simple and I am looking around and reading how to do
> this, but any pointers or sharable code would be helpful.
JRS: In article <74aMf.44599$bW.19883@bignews8.bellsouth.net>, dated
Sat, 25 Feb 2006 23:27:39 remote, seen in news:comp.lang.javascript, Hal
Rosser <hmrosser@bellsouth.net> posted :
>> Can someone explain how I can use javascript (I am assuming this is the
>best
[quoted text clipped - 9 lines]
>value
>> to give a me a total value
>There are many examples at this website:
>http://www.w3schools.com/js/js_examples.asp
>some folks say the site has many errors - maybe so - but it also has many
>good examples.
>Take a look and decide for yourself.
If the OP knows as little as he asserts, he will not be able (with
reasonable effort) to judge which parts, if any, are good.
Actually, there are two ways of adding; if one adds "cat" and "fish" one
gets "catfish", but if one adds 1 and 2 one gets 3. Javascript supports
both of those, alas with the same operator.
Generally, one wants to do more than the OP asks; hence a slightly more
general solution will be more informative.
Let ADDR stand for some way of addressing a field.
Then ADDR.value is, for the sort of control in question, a String
holding the content of the field. If that string represents a number,
then +ADDR.value gives a Number of appropriate value.
So: var Qty1 = +ADDR1.value
var Qty2 = +ADDR2.value
ADDR3.value = Qty1 + Qty2 // auto-converted to String
For the second case, use selectedIndex to address the field chosen, like
PlaceValue.value = + Places.options[Places.selectedIndex].value
Read the newsgroup FAQ.

Signature
© John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 IE 4 ©
<URL:http://www.jibbering.com/faq/> JL/RC: FAQ of news:comp.lang.javascript
<URL:http://www.merlyn.demon.co.uk/js-index.htm> jscr maths, dates, sources.
<URL:http://www.merlyn.demon.co.uk/> TP/BP/Delphi/jscr/&c, FAQ items, links.
Jonas Raoni - 28 Feb 2006 08:10 GMT
> So: var Qty1 = +ADDR1.value
> var Qty2 = +ADDR2.value
> ADDR3.value = Qty1 + Qty2 // auto-converted to String
I preffer:
+field.value || 0
Then, NaN values will be converted to 0

Signature
Jonas Raoni Soares Silva
http://www.jsfromhell.com
Dr John Stockton - 28 Feb 2006 23:13 GMT
JRS: In article <du10ih$tc6$4@emma.aioe.org>, dated Tue, 28 Feb 2006
05:10:57 remote, seen in news:comp.lang.javascript, Jonas Raoni
<jonasraoni@gmail.com> posted :
>> So: var Qty1 = +ADDR1.value
>> var Qty2 = +ADDR2.value
[quoted text clipped - 5 lines]
>
>Then, NaN values will be converted to 0
In general, NaN values should not be converted to zero; they should
result in a form of error message suited to the application.

Signature
© John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 IE 4 ©
<URL:http://www.jibbering.com/faq/> JL/RC: FAQ of news:comp.lang.javascript
<URL:http://www.merlyn.demon.co.uk/js-index.htm> jscr maths, dates, sources.
<URL:http://www.merlyn.demon.co.uk/> TP/BP/Delphi/jscr/&c, FAQ items, links.
mehere - 28 Feb 2006 11:32 GMT
> JRS: In article <74aMf.44599$bW.19883@bignews8.bellsouth.net>, dated
> Sat, 25 Feb 2006 23:27:39 remote, seen in news:comp.lang.javascript, Hal
[quoted text clipped - 46 lines]
>
> Read the newsgroup FAQ.
OP here
Thanks and yes VERY new to this cheers for your help
Greg