Add values in the textboxes in javascript
-
hi, I have three textboxes and a button. When I click the button the numeric values in the textboxes should be added by javascript.If no value is entered in the textbox then it will not be added.I have using it in asp.net.The button should not be postback to the server. How can I do this ? Regards, Bill
-
hi, I have three textboxes and a button. When I click the button the numeric values in the textboxes should be added by javascript.If no value is entered in the textbox then it will not be added.I have using it in asp.net.The button should not be postback to the server. How can I do this ? Regards, Bill
Do the following: - Use the property of the button OnClientClick="SumValues()" to do the summation on client side - Add a javascript function SumValues() for example and make it sum the text values, to get the value of each textbox use getElementById in javascript.
Sincerely Samer Abu Rabie Imagination is more important than knowledge !
-
hi, I have three textboxes and a button. When I click the button the numeric values in the textboxes should be added by javascript.If no value is entered in the textbox then it will not be added.I have using it in asp.net.The button should not be postback to the server. How can I do this ? Regards, Bill
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.