When the user presses the "Compute My Tax" button the VBscript should compute the tax in two steps:
- Compute Taxable Income. If the user checked the Standard Deduction Box, then
Taxable Income = Adjusted Gross Income - (2,750.0) times (Number of Dependents + 1)
if the user did not check Standard Deduction, then
Taxable Income = Adjusted Gross Income - Itemized Deductions
- then Tax is computed based on Filing Status. If Married,
Tax = Taxable Income * 0.0034
if Filing Status is Single, then,
Tax = Taxable Income * 0.0028
Show the value of Tax in the bottom frame (this frame must be created on-the-fly). Use a function named checknum to assure that only the digits 0 through 9 are entered into the fields: Adjusted Gross Income, Number of Dependents, and Itemized Deductions. The function should return a value of zero if there is no error and a value of 1 if an error is detected. The program should use this value returned from checknum to display an error message if appropriate.
ANSWER
Click here for the working answer.
The top level frame structure (the one linked above) is:
<html>
<frameset rows="250,*">
<frame src="s9937ft0.htm">
<frame src="s9937ft1.htm">
</frameset>
</html>
Then the ...ft0.htm is:
<html>
<frameset cols="200,*">
<frame src="s9937fta.htm">
<frame src="s9937ftb.htm">
</frameset>
</html>
and, the ...ft1.htm is:
<html>
<frameset cols="200,*">
<frame src="s9937ftc.htm">
<frame src="s9937ftd.htm">
</frameset>
</html>
So you get:
..fta.htm | ..ftb.htm |
..ftc.htm | ..ftd.htm |
When viewing the working answer, right click in the frame, then "View Source"