# This newbie has text field problems

**URL:** <https://forum.kirupa.com/t/this-newbie-has-text-field-problems/288804>\
**Category:** Uncategorized\
**Created:** [May 21, 2009, 7:34am UTC](https://forum.kirupa.com/t/this-newbie-has-text-field-problems/288804 "2009-05-21T07:34:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![swerheatz](https://avatars.discourse-cdn.com/v4/letter/s/f08c70/32.png) [@swerheatz](https://forum.kirupa.com/u/swerheatz)\
**Post date:** [May 21, 2009, 7:34am UTC](https://forum.kirupa.com/t/this-newbie-has-text-field-problems/288804/1 "2009-05-21T07:34:17Z")

</div>

Hey ! I thank you about your advices.

I made all the corrections in my code and got a working one. But what I really want to do is not adding texts into one text field. I need to get the numbers which is written by users into text boxes and then use their inputs to make some calculations. (Like 3+6=9 ). When I assign numbers to variables Ican easily make calculations but what I really want is not that. the numbers should be entered by these text boxes. I think need to change “string” to “number” but when I do this I get error message. I am planning to use the calculation result in some other part of my code. I am wondering if using “return” function useful for me to get the number (the result) of calculation?

btw I wrote these and stuck afterall…

```auto

var inputone_num:Number;
var inputtwo_num:Number;

doit_btn.addEventListener(MouseEvent.CLICK, calculation);

function calculation(event:MouseEvent):void

{
inputone_num=inputone_txt.text;
inputtwo_num=inputtwo_txt.text;

}

```

I know I can not mix text and numbers together but I just tried.
