OOPS. I take it back. I see a major mistake in your table2 stuff.
in both the area and perimeter calculations is getElementById("answerA")
but you don't have any such id in your page, at all.
And you have other errors. You do
but you never define tbox1A or tbox2A, for example.
So, yeah, all that code is hosed.