Text box scripts

I need a script that tells a text box to say a certain word/number depending on what is input into another text box.

E.g. if 12345 is input into texBox A, then XXX is displayed in textBox B
and if 54321 is input into textBox A, then ZZZ is displayed in textBox B

(in reality there will be 3 text boxes, 1 for input and 2 will display corresponding outputs)

So more like if 12345 is input in textBox A, then XXX is displayed in textBox B and ZZZ in textBox C.

I take it that these boxes need Var names and have been able to do similar things with complicated calculators but am having difficulty at the moment.

Any help would be greatly appreciated. Thanks!