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("SentenceList", "Please enter sentences into the sentence list."); if (!CanSubmit) return; //Check there are no more than 35 words - if there are more than 35, //POST the information rather tha using GET //Grab the word list text var sentenceList = document.getElementById("SentenceList").value; //If the list is over 200 characters long, post the vars if (sentenceList.length > 200) { document.LayoutMixedSentences.method = "post"; document.LayoutMixedSentences.VarsPosted.value = "true"; } //If fields have been entered correctly, submit the form document.LayoutMixedSentences.submit(); } //end function