function ValidateData() { //Submission variable var CanSubmit = false; //Check to make sure that the worksheet title field is not empty. CanSubmit = ForceEntry("WorksheetTitle", "Please enter a title for the worksheet."); if (!CanSubmit) return; //Check there is something entered into the word list CanSubmit = ForceEntry("Text", "Please enter some text to print on the worksheet."); if (!CanSubmit) return; // check font size has been supplied CanSubmit = ForceNumber("HWFontSize", "Font size"); if (!CanSubmit) return; //If instructions and text over run, //POST the information rather tha using GET //Grab the word list text var textList = document.getElementById("Text").value; var instructionsList = document.getElementById("Instructions").value; //If the list is over 200 characters long, post the vars if (textList.length + instructionsList > 200) { document.LayoutHW.method = "post"; document.LayoutHW.VarsPosted.value = "true"; } //If fields have been entered correctly, submit the form document.LayoutHW.submit(); } //end function