so I'm really rusty on java and I have to make a form using HTML and java that does the following:
it has 3 fields to enter numbers
the second field is 3 times the first and the third one is the cube of the second.

when you enter a number into any of the fields it is supposed to use onChange to change the other fields to the correct amount,

can somebody help me on this? I'm completely lost, basically all i have is a normal form here.
<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>

<script language="javascript" src="/js/pt/prototype.js"></script>

<script language="javascript>
function recalcTextBoxes() {
// Make sure both boxes have a value
if (TextBox1.value != "" )) {
// if both boxes have a value calculate for box 3
TextBox2.value = TextBox1.value*3 ;
TextBox3.value = TextBox1.value*TextBox1.value*TextBox1.value;
}
}
</script>
</head>

<body>
<FORM ACTION="../cgi-bin/mycgi.pl">
<!-- table titles -->


<!-- v-neck sweater -->
First
<input
type=TEXT
name="TextBox1"

onchange="recalcTextBoxes()" />

Second
<INPUT
TYPE=TEXT
NAME="TextBox2"
^that's what i have so far, it does nothing