External Variables?
Posted: Thu Feb 05, 2004 3:20 am
I have this html / javascript : -
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled</title>
<script language="JavaScript" type="text/javascript">
<!--
var c;
function a_int_b(form){
c=0;
a=eval(form.a.value);
b=eval(form.b.value);
c=a;
for(var i = 0;i<b;i++){
c =c*1.00482;
}
form.ans.value = c.toFixed(2);
}
//-->
</script>
</head>
<body>
<form>
amount<input type ="text" name="a" size="20"><br>
months<input type ="text" name="b" size="20"><br>
amount with interests<input type ="text" name="ans" size="20"><br>
<input type ="button" onClick="a_int_b(this.form)">
</form>
</body>
</html>
But I want the 1.00482 to be saved in an external file, eg txt or xls. So it can be changed easily.
I've heard theat this cant be done in java and would want to know if it can be done in php?
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled</title>
<script language="JavaScript" type="text/javascript">
<!--
var c;
function a_int_b(form){
c=0;
a=eval(form.a.value);
b=eval(form.b.value);
c=a;
for(var i = 0;i<b;i++){
c =c*1.00482;
}
form.ans.value = c.toFixed(2);
}
//-->
</script>
</head>
<body>
<form>
amount<input type ="text" name="a" size="20"><br>
months<input type ="text" name="b" size="20"><br>
amount with interests<input type ="text" name="ans" size="20"><br>
<input type ="button" onClick="a_int_b(this.form)">
</form>
</body>
</html>
But I want the 1.00482 to be saved in an external file, eg txt or xls. So it can be changed easily.
I've heard theat this cant be done in java and would want to know if it can be done in php?