If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

adding 2 text inputs to fill another

Been looking around the internet and cannot seem to word my question good enough to produce anything close to what I want to do. I wrote a form for use at a golf course I work at. It is a form for keeping pesticide records. I am trying to figure out how to get in to mutiply 2 text input boxes together and autofill other ones with the result.

I have to input ounces of chemical used per 1000 ft²
I have to input acres sprayed

I would like to have the form autofill sections for Amount of chemical used per acre and total amount of chemical used. I know all the math involved I just can't figure out how to make it do it in html. I can post my code if needed.

Finally got a chance to work on this works great, thanks much. I do have a few more questions I cant seem to figure out. I have been working with the general idea code you gave me and have most of it dialed in. What would be the symbol for divide? Is it / or is that recognized as a html slash? My other question is can I double up the code on one line to have the same field effect 2 fields in different manners? I have tried a few different ways and none seem to work.

as you have many fields on your page and naming them field1,2,3 etc... will increase confusion. so best ideas is to name those fields descriptively. for example amount_per_1000ft1, amount_per_1000ft2 etc...
then you can calculate easily for every item.

as you have many fields on your page and naming them field1,2,3 etc... will increase confusion. so best ideas is to name those fields descriptively. for example amount_per_1000ft1, amount_per_1000ft2 etc...
then you can calculate easily for every item.

Working out a few bugs on this form based on input from the people who use it. One thing I am having issues with is I need to add letters in the same text input field after the number and I keep getting NaN as the formula result. I am guessing that this means "not a number". Is there something I can do to have it ignore the letters in the formulation?

Revising this form again and running into an issue rounding up the product of 2 multiplied values. Here is what the snippet looks like. Works until I try to use the math.ceil or math.round function, then it breaks.

I guess real men use capital letters with things like Math.ceil! Figured it out after a good 45 minute battle. LOL

Now onto the latest issue. I am trying to use the product of that formula to multiply it with another keyed number. I Feel that it has to do with trying to use the value of acre2 in which gets its value from the previous formula thus not being "keyedup". I have searched for a replacement function for onkeyup but I haven't had any luck.