Can anyone tell me how retrieve a calculated value of a variable from another function:
Sorry for the silly example but:
<head>
<SCRIPT LANGUAGE="JavaScript">
var estimate = 0;
function total1 (){
estimate = 55;
}
function revisedtotal2 () {
estimate = estimate + 25;
}
</script>
</head>
<body>
<script language="JavaScript1.2">total1();</script>
<a href='javascript:revisedtotal2();'><img name="mw_1622_sw" src="graphics/mw_1622_sw.jpg" width="75" height="64" border="0"></a>
</body>
Obviously, after I call the revisedtotal2 function I want the value of estimate = 80.
Thanks,
Rich
Sorry for the silly example but:
<head>
<SCRIPT LANGUAGE="JavaScript">
var estimate = 0;
function total1 (){
estimate = 55;
}
function revisedtotal2 () {
estimate = estimate + 25;
}
</script>
</head>
<body>
<script language="JavaScript1.2">total1();</script>
<a href='javascript:revisedtotal2();'><img name="mw_1622_sw" src="graphics/mw_1622_sw.jpg" width="75" height="64" border="0"></a>
</body>
Obviously, after I call the revisedtotal2 function I want the value of estimate = 80.
Thanks,
Rich