Adding two numbers(digits)

Hello. I have to input text fields and third - dynamic. Also I have a button. I want that on button press in the dynamic field would be displayed the sum of two numbers entered in those input fields. First field: var1 Second: var2
and dynamic text: answer.

I wrote scipt but look what happens. For example I input to numbers: 5 and 6 I need to get answer 11 but the sum is shown: 56 . Any help? Thanks.