I just can't get this right.
I have two textfields:
- inputTxt (INPUT)
- statusTxt (DYNAMIC)
I have a button, which when pressed should check whether the characters entered into the input field are numbers or letters.
I have tried:
I realise now that isNAN() only checks a variable value rather than a string value.Code:private function onMouseUp(evt:MouseEvent):void { if (isNaN(inputTxt.text)) { statusTxt.text = 'You have not entered a number'; }else { statusTxt.text = 'You have entered a number'; } }
How does one do this?