as you can see im not really good at this, can someone please help me with this one 2
<html>
<head>
<title>Tax Application</title>
<script type = "text/VBScript">
option explicit
function calculate()
dim intsalary, inttotaltax, intnet, intgross, intrate, blnNumber
inttotaltax = document.frmtax.txttotaltax.value
intnet = document.frmtax.txtnet.value
intgross = document.frmtax.txtgross.value
intsalary = document.frmtax.txtsalary.value
blnNumber = isNumeric(intsalary)
if (blnNumber = false) then
window.alert("Please enter a value")
else
intgross = (52 * intsalary)
if intsalary<6001 then
intrate="0"
else if intsalary=>21600 then
intrate="0.17"
else if intsalary=<58000 then
intrate="0.30"
else if intsalary=<70000 then
intrate="0.42"
else if intsalary=>70001 then
intrate="0.47"
inttotaltax = (intsalary * intrate)
document.frmtax.txttotaltax.value = FormatCurrency(inttotaltax,2)
intnet = (intsalary - inttotaltax)
document.frmtax.txtnet.value = FormatCurrency(intnet,2)
document.frmtax.txtgross.value = FormatCurrency(intgross,2)
end if
end if
end function
</script>
</head>
<body>
<h1>Calculate Annual Tax</h1>
<form method="post" name="frmtax" action="javascript:void(0)"> <p>
Enter your weekly salary here:<input type="text" name="txtsalary" size="28"><br>
<input type="submit" value="Calculate Tax" name = "btncalc" onClick = "calculate()"><br>
Annual Gross Income:<input type="text" name="txtgross" size="28"><br>
Annual Net Income:<input type="text" name="txtnet" size="28"><br>
Total Tax for the Year:<input type="text" name="txttotaltax" size="28"><br>
</form>
</body>
</html>
thanks!
<html>
<head>
<title>Tax Application</title>
<script type = "text/VBScript">
option explicit
function calculate()
dim intsalary, inttotaltax, intnet, intgross, intrate, blnNumber
inttotaltax = document.frmtax.txttotaltax.value
intnet = document.frmtax.txtnet.value
intgross = document.frmtax.txtgross.value
intsalary = document.frmtax.txtsalary.value
blnNumber = isNumeric(intsalary)
if (blnNumber = false) then
window.alert("Please enter a value")
else
intgross = (52 * intsalary)
if intsalary<6001 then
intrate="0"
else if intsalary=>21600 then
intrate="0.17"
else if intsalary=<58000 then
intrate="0.30"
else if intsalary=<70000 then
intrate="0.42"
else if intsalary=>70001 then
intrate="0.47"
inttotaltax = (intsalary * intrate)
document.frmtax.txttotaltax.value = FormatCurrency(inttotaltax,2)
intnet = (intsalary - inttotaltax)
document.frmtax.txtnet.value = FormatCurrency(intnet,2)
document.frmtax.txtgross.value = FormatCurrency(intgross,2)
end if
end if
end function
</script>
</head>
<body>
<h1>Calculate Annual Tax</h1>
<form method="post" name="frmtax" action="javascript:void(0)"> <p>
Enter your weekly salary here:<input type="text" name="txtsalary" size="28"><br>
<input type="submit" value="Calculate Tax" name = "btncalc" onClick = "calculate()"><br>
Annual Gross Income:<input type="text" name="txtgross" size="28"><br>
Annual Net Income:<input type="text" name="txtnet" size="28"><br>
Total Tax for the Year:<input type="text" name="txttotaltax" size="28"><br>
</form>
</body>
</html>
thanks!