Please help with this error check...have been trying for hours unsuccessfully

Hello,

I have written this code for the purpose of calcualting the division of 2 input numbers.

on(press){
_parent.c1.text = Math.round(10000*Number(_parent.a1.text) /Number(_parent.a2.text))/10000;
}

where c1 is the output variable and a1 and a2 are input varaibles.

If user enters characters characters other other than numeric ones like strings or special characters like ?, + etc and clicks submit button, I have to display an error message. Please help me incorporate these in my code. I have been trying unsuccessfully for a long time. if the above code is not useful, please suggest other code that can do my above calculation and also check for the error…

Any help wud be greatly appreciated.

Thanks in advance.