OK, for those of you watching from the sidelines, remember when we talked about the Prototype framework, and I said it could be done slicker? I am now correcting those little errors.
First of all, I was not using enough parts of Prototype, and so I was doing unnecessary stuff, and also, I was leaving empty `` tags in the DOM, not removing them like I should.
/* Shows the order form, and hides the button. */
* Returns false if listed fields are not filled out.
var labeltext = “Hey!“;
var fields = new Array(“nameid”,
“zipid”, “cityid”, “phoneid”);
var we_have_an_error = false;
/* Remove the removables */
var lbls = document.getElementsByClassName(“removable”);
for (i=0; i