Not the answer you're looking for? What are the long metal things in stores that hold products that hang from them? How to calculate two textbox values in javascript html Is it rude to tell an editor that a paper I received to review is out of scope of their journal? Performing arithmetic operations on two inputs in JavaScript 0. 0. sum up user input with javascript. It's free to sign up and bid on jobs. To learn more, see our tips on writing great answers. then i have anohter two radio button and two text box, one radio button for one text box. Now i want it to auto compute. for that you need to check first. However, we do not want to set the value of the radio button to the price of the cake. @BrunoQuaresma but its worked well for me for one calculation purpose. How to iterate through ASP .NET textboxes using javascript and calculate a value? Do any two connected spaces have a continuous surjection between them? JavaScript calculator with two inputs and four operations // Here, we need to take user's the selection from radio button selection, //Get a reference to the form id="cakeform". Declare all the input fields with the id attributes of each input field to find the desired values in each row. Same for rpd. How to calculate two textbox values in javascript html javascript - Add two textbox values and display the sum in This won't sum up the number; instead it will concatenate it: var x = y + z; You need to do: var x = (y)+ (z); You must use parseInt in order to specify the operation on numbers. Program to calculate the sum of two numbers in JavaScript