OK...I am trying to pass the variable x to the input Total. I currently have an alert box giving the answer. I would like to have itpassdto the input box. It still needs to be fixed at 2 decimal places. Also (if not too much trouble) I would like to have it pop an alert and reset the page if anything but a number greater than zero is entered although that is not necessary. Thanks
<title>Tithe Calculator</title>
<meta name="created" content="Thu, 20 Aug 2009 14:30:49 GMT" />
<meta name="author" content="Larry Ashburn" />
<meta name="keywords" content="" />
<head>
<title>Tithe Calculator</title>
</head>
<body bgcolor="#cccccc"topmargin=50 bottommargin=0 leftmargin=0 rightmargin=0 marginheight=0 marginwidth=0>
<div align="center">Pay Amount<br><br>
<form name="Tithe" action="">
<input type="text" name="Amount" value="0"><br><br>
Pay Frequency<br>
<input type="radio" name="Tithe" value=".10" />Weekly<br />
<input type="radio" name="Tithe" value=".05" />Bi-Weekly<br />
<input type="radio" name="Tithe" value=".042" />15th/30th<br />
<input type="radio" name="Tithe" value=".023" />Monthly<br />
<input type="radio" name="Tithe" value=".00191" />Yearly<br /><br>
<input type="button" onclick="return Tithe_Amount()" value=" Weekly Tithe Amount " /><br><br>
<input type="text" name="Total">
</form>
<br />
<br />
</div>
<script type="text/javascript">
<!--
function Tithe_Amount()
{
for (var i=0; i < document.Tithe.Tithe.length; i++)
{
if (document.Tithe.Tithe.checked)
{
var x = document.Tithe.Tithe.value * document.Tithe.Amount.value;
alert("Your Weekly Tithe Amount: $" + x.toFixed(2));
return false;
}
}
}
//-->
</script>
</body>
</html>
<title>Tithe Calculator</title>
<meta name="created" content="Thu, 20 Aug 2009 14:30:49 GMT" />
<meta name="author" content="Larry Ashburn" />
<meta name="keywords" content="" />
<head>
<title>Tithe Calculator</title>
</head>
<body bgcolor="#cccccc"topmargin=50 bottommargin=0 leftmargin=0 rightmargin=0 marginheight=0 marginwidth=0>
<div align="center">Pay Amount<br><br>
<form name="Tithe" action="">
<input type="text" name="Amount" value="0"><br><br>
Pay Frequency<br>
<input type="radio" name="Tithe" value=".10" />Weekly<br />
<input type="radio" name="Tithe" value=".05" />Bi-Weekly<br />
<input type="radio" name="Tithe" value=".042" />15th/30th<br />
<input type="radio" name="Tithe" value=".023" />Monthly<br />
<input type="radio" name="Tithe" value=".00191" />Yearly<br /><br>
<input type="button" onclick="return Tithe_Amount()" value=" Weekly Tithe Amount " /><br><br>
<input type="text" name="Total">
</form>
<br />
<br />
</div>
<script type="text/javascript">
<!--
function Tithe_Amount()
{
for (var i=0; i < document.Tithe.Tithe.length; i++)
{
if (document.Tithe.Tithe.checked)
{
var x = document.Tithe.Tithe.value * document.Tithe.Amount.value;
alert("Your Weekly Tithe Amount: $" + x.toFixed(2));
return false;
}
}
}
//-->
</script>
</body>
</html>