Why the calculate button won't work?

Hi guys

Just wondering why this not working the link below, when I press the calculate button.
http://coder9.com/calc/

It supposed to print/echo something.

Thank you very much in advanced.

Hi,
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)
{
	//interest=interest+0.01;
	//val=(amount*interest/(100*12))*(1/(1-1/(Math.pow(1+interest/(12*100),month))));
	//ir2=((val*month)-amount).toFixed(8);
			
	ir2=ir2+0.01;
			
	document.getElementById("ir").value=ir2;
}

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.