Input text

Hi all!
I have three text boxes side by side.
The first two are input boxes and the third is a dynamic text box.
I want the user to be able to input numbers into box 1(target1a) and multiply it by box 2(target1b) and show the answer in box 3(target1c).
I’m sure this is simple but I have no idea how to go about it.
Any help would be greatfully accepted!
many thanks:)

Something like this:


// Restrict input to only include numbers and a minus character
target1a.restrict = target1b.restrict = "0-9 \\-";
 
// Setting a function that is run as soon as the contents of 
// target1a or target1b changes.
target1a.onChanged = target1b.onChanged = function()
{
     // Check if contents of target1a or target1b is not a number.
    var a = isNaN(target1a.text) ? 0 : Number(target1a.text);
    var b = isNaN(target1b.text) ? 0 : Number(target1b.text);
 
    // Do the math.
    target1c.text = a * b;
}

/Mirandir

works like a dream . . .
thanks - you guys are just great!