I am a super newbie to Javascript. I have only written a couple poorly coded scripts, but hey they work atleast. Anyhow I wrote a script tonight that calculates the amount of remaining payments on a loan or credit card balance then writes it to the screen in a nice format giving you a statement of what if payment history. I don't know how to do a loop in javascript so I just used an IF/ELSE statement that looped between functions until the principal fell under 0. This worked but I find that on larger loans the browser reports that it is out of stack space. This appears to be based of system memory. For instance in my system in 384MB I can get through 234 months of payments before "out of stack space" on a smaller laptop with 64MB I can only get to 160 months. I am sure there is nothing I can do to correct it but was wondering if anyone could maybe look at the script and see a better way to write it. Is there some other way to do a loop in Java? Keep in mind im still new so take it easy on me. anyways the script/webpage is available here:
<!-- m --><a class="postlink" href="http://www.digiclipse.com/home/calc.htm">http://www.digiclipse.com/home/calc.htm</a><!-- m -->
Thanks in advance,
Eric
<!-- m --><a class="postlink" href="http://www.digiclipse.com/home/calc.htm">http://www.digiclipse.com/home/calc.htm</a><!-- m -->
Thanks in advance,
Eric