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.
| SitePoint Sponsor |
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.
I Love JavaScript & jQuery...


Hi,
There is errors in JS code, for example, at this line you should add a value to that variable:
Use Mozilla Firefo with Firebug addon to see the errors.Code:var finalterm=;
Free: Web Programming Courses HTML, CSS, Flash
Web Programming: AJAX Course and PHP-MySQL Course video Lessons
Good JavaScript and jQuery course for beginners




why is it this while loop make the page unresponsive?
I just want to print the value of ir2 into input box of ir1;Code: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; }
What is the solution to this?
Thank you very much in advanced.
I Love JavaScript & jQuery...




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.Code:while (ir2!=tip) {
You may want to re-think that test.
Tab-indentation is a crime against humanity.
Bookmarks