davey
11-27-2003, 09:33 PM
<html>
<head>
<title>Goku</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script type="text/javascript">
<!--
var global=50;
function SetGlobal(param){
global+=param;
return global;
}
function Process(){
alert ("Original power = "+global+", new power = "+SetGlobal(50));
}
function Process2(){
alert ("Original power = "+global+", new power = "+SetGlobal(100));
}
function Process3(){
alert("Original power = "+global+", new power = "+SetGlobal(150));
}
var money=10000;
function Setmoney(param){
money+=param;
return money;
}
function Process5(){
alert("Original money = "+money+", current balance = "+Setmoney(500));
}
function Process6(){
alert("Original money = "+money+", current balance = "+Setmoney(200));
}
function Process7(){
alert("Original money = "+money+", current balance = "+Setmoney(50));
}
//-->
</script>
</head>
<body bgcolor="#6DBE25">
<p align="center"><font color="#FFFF00">Goku's Profile</font></p>
<p align="center"><font color="#ffff00"><a href="login.html">Back To Player List</a></font></p>
<p align="center"><img src="goku.jpeg" width="227" height="305"></p> <p></p>
<center><table width="75%" border="4" cellspacing="2" cellpadding="2">
<tr>
<td><font color="#FFFF00"><strong>Power:</strong></font></td>
<td><font color="#FFFF00"><strong>Money:</strong></font></td>
</tr>
<tr>
<td><font color="#FFFF00"><SCRIPT LANGUAGE="JavaScript">
<!--
document.write("<FONT COLOR='#ffff00'>Your power is " + global + ".</FONT>");
// -->
</SCRIPT>
</font></td>
<td><font color="#FFFF00"><SCRIPT LANGUAGE="JavaScript">
<!--
document.write("<FONT COLOR='#ffff00'>You have " + money + " dollars.</FONT>");
// -->
</SCRIPT></font></td>
</tr>
</table></center>
<br>
<p><center>
<table width="75%" border="4" cellspacing="2" cellpadding="2">
<!--DWLayoutTable-->
<tr>
<td height="28" colspan="2" valign="top"><center>
<font color="#FFFF00"><strong>Fight Log: </strong></font>
</center></td>
</tr>
<tr>
<td width="303"><font color="#FFFF00">wins: 0</font></td>
<td width="303"><font color="#FFFF00">loses: 0</font></td>
</tr>
</table>
</center><p></p>
<p><center>
<table width="75%" border="4" cellspacing="2" cellpadding="2">
<tr>
<td><center><font color="#FFFF00">Training</font> </td>
<td><center><font color="#FFFF00">Earn Money</font> </td>
</tr>
<tr>
<td><center><input type="button" value="Punch" onclick="Process()"/></td>
<td><center><input type="button" value="Work" onclick="Process5()"/></td>
</tr>
<tr>
<td><center><input type="button" value="Kick" onclick="Process2()"/></td>
<td><center><input type="button" value="Steal" onclick="Process6()"/></td>
</tr>
<tr>
<td><center><input type="button" value="Energy" onclick="Process3()"/></td>
<td><center><input type="button" value="Beg" onclick="Process7()"/></td>
</tr>
</table>
</center>
</body>
</html>
after the processes run they change the variable but
<SCRIPT LANGUAGE="JavaScript">
<!--
document.write("<FONT COLOR='#ffff00'>You have " + money + " dollars.</FONT>");
// -->
</SCRIPT> doesnt update how can i get these two to update with the variable?
<head>
<title>Goku</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script type="text/javascript">
<!--
var global=50;
function SetGlobal(param){
global+=param;
return global;
}
function Process(){
alert ("Original power = "+global+", new power = "+SetGlobal(50));
}
function Process2(){
alert ("Original power = "+global+", new power = "+SetGlobal(100));
}
function Process3(){
alert("Original power = "+global+", new power = "+SetGlobal(150));
}
var money=10000;
function Setmoney(param){
money+=param;
return money;
}
function Process5(){
alert("Original money = "+money+", current balance = "+Setmoney(500));
}
function Process6(){
alert("Original money = "+money+", current balance = "+Setmoney(200));
}
function Process7(){
alert("Original money = "+money+", current balance = "+Setmoney(50));
}
//-->
</script>
</head>
<body bgcolor="#6DBE25">
<p align="center"><font color="#FFFF00">Goku's Profile</font></p>
<p align="center"><font color="#ffff00"><a href="login.html">Back To Player List</a></font></p>
<p align="center"><img src="goku.jpeg" width="227" height="305"></p> <p></p>
<center><table width="75%" border="4" cellspacing="2" cellpadding="2">
<tr>
<td><font color="#FFFF00"><strong>Power:</strong></font></td>
<td><font color="#FFFF00"><strong>Money:</strong></font></td>
</tr>
<tr>
<td><font color="#FFFF00"><SCRIPT LANGUAGE="JavaScript">
<!--
document.write("<FONT COLOR='#ffff00'>Your power is " + global + ".</FONT>");
// -->
</SCRIPT>
</font></td>
<td><font color="#FFFF00"><SCRIPT LANGUAGE="JavaScript">
<!--
document.write("<FONT COLOR='#ffff00'>You have " + money + " dollars.</FONT>");
// -->
</SCRIPT></font></td>
</tr>
</table></center>
<br>
<p><center>
<table width="75%" border="4" cellspacing="2" cellpadding="2">
<!--DWLayoutTable-->
<tr>
<td height="28" colspan="2" valign="top"><center>
<font color="#FFFF00"><strong>Fight Log: </strong></font>
</center></td>
</tr>
<tr>
<td width="303"><font color="#FFFF00">wins: 0</font></td>
<td width="303"><font color="#FFFF00">loses: 0</font></td>
</tr>
</table>
</center><p></p>
<p><center>
<table width="75%" border="4" cellspacing="2" cellpadding="2">
<tr>
<td><center><font color="#FFFF00">Training</font> </td>
<td><center><font color="#FFFF00">Earn Money</font> </td>
</tr>
<tr>
<td><center><input type="button" value="Punch" onclick="Process()"/></td>
<td><center><input type="button" value="Work" onclick="Process5()"/></td>
</tr>
<tr>
<td><center><input type="button" value="Kick" onclick="Process2()"/></td>
<td><center><input type="button" value="Steal" onclick="Process6()"/></td>
</tr>
<tr>
<td><center><input type="button" value="Energy" onclick="Process3()"/></td>
<td><center><input type="button" value="Beg" onclick="Process7()"/></td>
</tr>
</table>
</center>
</body>
</html>
after the processes run they change the variable but
<SCRIPT LANGUAGE="JavaScript">
<!--
document.write("<FONT COLOR='#ffff00'>You have " + money + " dollars.</FONT>");
// -->
</SCRIPT> doesnt update how can i get these two to update with the variable?