473,569 Members | 2,652 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Generate the formular from the script

2 New Member
Hi I am finding it hard to understand the script below

<SCRIPT language=JavaSc ript>
<!-- Begin
var i = 0; // interest
var m = 0; // months
var f = 0; // factor
var den = 0;
var s = "0"; // string
var d = 0; // decimal place
function CalcA() {
if(document.glo balForm.interes t.value=="" || document.global Form.months.val ue=="" ||

document.global Form.payment.va lue=="") {
alert("Please fill in all of the required fields.");
}
else {
if(document.glo balForm.period. options[1].selected == true) {
m = document.global Form.months.val ue * 12;
}
else {
m = document.global Form.months.val ue;
}
i = Math.pow(((docu ment.globalForm .interest.value/100)+1),.083333 3)-1;
den = i / (i+1);
f = Math.pow((i+1), m)-1;
f /= den;
f *= document.global Form.payment.va lue;
d = String(f).index Of(".");
s = String(f).subst ring(0,(d+3));
document.global Form.total.valu e = + s;
}
}
// End -->
</SCRIPT>

All i want is get the formular out which was applied in the above script so i can use coldfusion tags in solving the same problem. I don't want to use javascript for the caculation so if any one can deduce the formular from the scripts please do and inform me about it jamesonkeju@yah oo.com
Nov 29 '06 #1
1 1430
r035198x
13,262 MVP
Hi I am finding it hard to understand the script below

<SCRIPT language=JavaSc ript>
<!-- Begin
var i = 0; // interest
var m = 0; // months
var f = 0; // factor
var den = 0;
var s = "0"; // string
var d = 0; // decimal place
function CalcA() {
if(document.glo balForm.interes t.value=="" || document.global Form.months.val ue=="" ||

document.global Form.payment.va lue=="") {
alert("Please fill in all of the required fields.");
}
else {
if(document.glo balForm.period. options[1].selected == true) {
m = document.global Form.months.val ue * 12;
}
else {
m = document.global Form.months.val ue;
}
i = Math.pow(((docu ment.globalForm .interest.value/100)+1),.083333 3)-1;
den = i / (i+1);
f = Math.pow((i+1), m)-1;
f /= den;
f *= document.global Form.payment.va lue;
d = String(f).index Of(".");
s = String(f).subst ring(0,(d+3));
document.global Form.total.valu e = + s;
}
}
// End -->
</SCRIPT>

All i want is get the formular out which was applied in the above script so i can use coldfusion tags in solving the same problem. I don't want to use javascript for the caculation so if any one can deduce the formular from the scripts please do and inform me about it jamesonkeju@yah oo.com
Which part do you not understand?
Nov 29 '06 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

4
9544
by: k.mitz | last post by:
Hi, I have a PHP application that allows users to generate a .pdf report of their database content. Normally, I've had to refresh a page to call the script to generate the report, so there's a second or so when the browser goes blank. I was wondering if it was possible to use AJAX to call the script to generate the report, then begin the...
1
2950
by: ete | last post by:
Hallo zusammen, ist es möglich, dass man in Access aus einem Formular heraus bestimmte Felder auswählen kann, die dann ausschließlich gedruckt werden können? Vielen Dank für die Hilfe
2
3800
by: amir | last post by:
Hallo liebe Gemeinde, ich möchte aus einem Formular aus, eine bereits vorhandene Laufendenummer aus einer Tabelle.spalte auslese und dazu noch eine 1 addiere und dann das Ergebnis in ein Textfeld dieses Formulars schreiben! Danach werden weitere Daten von dem User eingegeben und dann werden alle diese Daten (die neue Laufendenummer auch) in...
1
2799
by: Niko Mann | last post by:
Hallo zusammen, ich habe folgendes Problem: Ich habe ein Formular in dem ein Gesamtwert in einem Feld errechnet wird. Jetzt möchte ich diesen Gesamtwert automatisch in ein anderes Feld im nächsten Formular übernehmen. Ist dies möglich? Hinzu kommt: Diese Gesamtsumme ist abhängig von einer Nummer (d.h.
0
1147
by: Brunner | last post by:
Hi, I'd like to print a diagram which is embedded in a formular. The only possibility I found is to draw the diagram in print event handler by hand on a Graphics. However this seems to be very circumstantial, because the diagram already exists on that formular. Is there a way to print the diagram or the whole formular without redrawing it...
5
1643
by: David Lozzi | last post by:
Hello, I'd like to create the SQL script for any given table, view or proc in my database, through ASP.Net using VB. I'm building a module library and providing this code on the fly would ease my pain a lot. To clarify, I'm looking for the same functionality that would you receive when you select Generate SQL Script... in Enterprise...
0
2247
by: ward | last post by:
Greetings. Ok, I admit it, I bit off a bit more than I can chew. I need to complete this "Generate Report" page for my employer and I'm a little over my head. I could use some additional assistance. I say additional because I've already had help which is greatly appreciated. I do try to take the time and understand the provided script...
1
4657
by: Chris Zopers | last post by:
Hello, I want to generate a SQL Script of a SQL Server database. To do this, I right-click the database name and choose the option All Tasks/Generate SQL Script. Than I get a text file with a script that generates all objects, but the order in which the objects are generated is wrong. There are a lot of views in the database and many...
23
2378
by: Geoff Cox | last post by:
Hello, Is it possible to use php to generate different menus for users who have access to files in different folders? For example, user Fred might be able to access files in folders A, B and F, whilst use Jane might be able to access files in folders A, D and E. I would want each user to only see text and links relevant to the files in...
0
7700
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7614
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7924
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7676
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6284
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
5219
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3653
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3642
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1221
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.