as I am learning to work with the Document Object Model, and creating variables to do simple math problems, I am not having any luck figuring out how to return the result of a math function to a specific field or form element on the page.
Lets say, for the sake of clarity, that I have a varialbe called "itemPrice", and I have a variable called "quantity".
Adn finally I have a variable called "total" which wil basically show the result of the multiplication of the itemPrice times the quantity.
var total = itemPrice*quantity
Now the problem or question I am having is how to get the result of that, which is the total contained in the variable named total, to transfer to an element some where else on the form page, so that when I select an item and then choose the quantity I can actually see the total in a box or an element field on the form page.
I guess My question is, how do I get the string from the variable called "total" to appear in a form element on the web page?
Andy help with what i am sure is probably a very simple problem, would be greatly appreciated.
joe_s_watson@hotmail.com
Lets say, for the sake of clarity, that I have a varialbe called "itemPrice", and I have a variable called "quantity".
Adn finally I have a variable called "total" which wil basically show the result of the multiplication of the itemPrice times the quantity.
var total = itemPrice*quantity
Now the problem or question I am having is how to get the result of that, which is the total contained in the variable named total, to transfer to an element some where else on the form page, so that when I select an item and then choose the quantity I can actually see the total in a box or an element field on the form page.
I guess My question is, how do I get the string from the variable called "total" to appear in a form element on the web page?
Andy help with what i am sure is probably a very simple problem, would be greatly appreciated.
joe_s_watson@hotmail.com


