Why the calculate button won't work?

Hi guys

Just wondering why this not working the link below, when I press the calculate button.

It supposed to print/echo something.

Thank you very much in advanced.

There is errors in JS code, for example, at this line you should add a value to that variable:

var finalterm=;

Use Mozilla Firefo with Firebug addon to see the errors.

The built-in error console is sufficient for that.

why is it this while loop make the page unresponsive?

while (ir2!=tip)

I just want to print the value of ir2 into input box of ir1;
What is the solution to this?

Thank you very much in advanced.

while (ir2!=tip)

Before you enter the loop, you must ensure that both variables are numeric types, and that ir2 is less than tip by an even multiple of 0.1. Even then rounding errors could cause the comparison to fail.

You may want to re-think that test.