Ask a Question related to Macromedia Dynamic HTML, Design and Development.
-
FinanceGuy #1
--> Finance Intern with Problem!
If anyone could help with this today, I would greatly appreciate it .
Here is my attempt:
function Calculate()
{
theForm = document.forms["calculator"];
with(Math)
{
P = theForm.contract.value;
I = theForm.rate.value;
n = theForm.term.value;
t = theForm.type.value;
if t = 1;
v = (P * I/1200)/(1 - pow(1+I/1200,-n));
// two decimal places
theForm.payment.value = round(100 * v)/100;
else if t=2;
P2 = P * (1+pow(I/12),3);
v = (P2 * I/1200)/(1-pow(1+I/1200,-n));
// two decimal places
theForm.payment.value = round(100 * v)/100;
else if t = 3;
P3 = P * (1+pow(I/12),6);
v = (P3 * I/1200)/(1-pow(1+I/1200,-n));
// two decimal places
theForm.payment.value = round(100 * v)/100;
else if t = 4;
P3 = P * (1+pow(I/12),12);
v = (P3 * I/1200)/(1-pow(1+I/1200,-n));
// two decimal places
theForm.payment.value = round(100 * v)/100;
}
return false;
}
</script>
[/B] </font>
Yeah, it doesn't work. :) I know it works without the conditional
statements, so the problem lies with the conditional statements. How close am
I?
Brad L. Hotz
FinanceGuy Guest
-
Yahoo Finance Stock Chart
Hi, looks like Yahoo Finance started to use flash to generate the stock chart. Can anyone give me some clue how those chart was generated? ... -
Flash player no audio at finance.yahoo.com?
I hope someone can help me because it's driving me crazy. Macromedia flash player appears to have no sound when playing videos from... -
[ANNOUNCE] Finance::Bank::HDFC version 0.12
Hi, I would like to announce the availability of Perl module Finance::Bank::HDFC version 0.12 on the CPAN. From the docs: NAME... -
[ANNOUNCE] Finance::Bank::HDFC version 0.01
Hi, I would like to announce the availability of Perl module Finance::Bank::HDFC version 0.01 on the CPAN. From the docs: NAME... -
Request for Comments - Finance::Calc::Performance
Please critique this potential new module with respect to namespace choice, naming conventions and general functionality. The POD is rather big so... -
delaneypub #2
Re: --> Finance Intern with Problem!
The format for the if statement in javascript is:
if (condition) {
statement block
}
elseif (condition) {
statement block
}
So ,maybe this is what you meant:
if (t = 1) {
v = (P * I/1200)/(1 - pow(1+I/1200,-n));
// two decimal places
document.theForm.payment.value = round(100 * v)/100;}
etcetera
delaneypub Guest
-
FinanceGuy #3
Re: --> Finance Intern with Problem!
Thanks for the javascript tip.
I put that into my code, and it didn't work.
Brad
FinanceGuy Guest



Reply With Quote

