0

hi

in jsp how do i add two numbers that has been inputed by user which is in a text box...


thank you

2
Contributors
6
Replies
7
Views
11 Years
Discussion Span
Last Post by jwenting
0

convert them both to a numerical data type and then add them together.
Very easy.

hi if i do it the way you said and add another text box for result. if a user enters two numbers would it show the result instantly.

thank you

0

hi

i mean i knw how to calculate and convert to int. But if put the total in a variable. then how would i retrive it in servlet and save it in the database?

thanks

0

you'd have to send it to the servlet, the servlet isn't going to know it's there to be saved unless someone tells it so.

0

you'd have to send it to the servlet, the servlet isn't going to know it's there to be saved unless someone tells it so.

how would i send it to servlet is it the action attribute.... or something else? because the variable total wouldnt be shown to users..

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.