var score = 0; $(document).ready(function(){ $('#Trophybutton').click(function() { ClaimTrophy(this.form); }); }); function checkAnswers(form) { score = 0; if (score < ) { $('#Checkbuttontext').val('Check again'); } if (score >= ) { $('#Trophybutton').show(); $('#Trophybutton').val('Claim Your Trophy for ' + score + ' out of '); } if (score == ) { $('#Checkbutton').hide(); } } function ClaimTrophy(form) { form.Other_Text.value = score + ' out of '; form.submit(); } function ShowDescription() { $('#GreyOut').show(); $('#DescriptionBox').show(); } function HideDescription() { $('#GreyOut').hide(); $('#DescriptionBox').hide(); } function ShowHelp() { $('#GreyOut').show(); $('#HelpBox').show(); } function HideHelp() { $('#GreyOut').hide(); $('#HelpBox').hide(); } function RemoveSpaces(){ var StudentsText; for (var z=1; z<=; z++ ){ StudentsText = $('input[name=Guess'+z+']').val().split(' ').join(''); StudentsText = StudentsText.replace(//g,''); $('input[name=Guess'+z+']').val(StudentsText); } }