I have a textbox with id=DiscountCode. Someone must enter the correct discount code in order for the form to submit. If it does not match, then there will be an alert and form will not submit. Right now, using this code, it only accepts exact entry and is case sensitive. Can someone help me to make the answer someone types in case insensitive? Thank you.
<script>
function validateForm(form) {
if (document.getElementById("DiscountCode").value != "RegStudent") {
alert("Sorry, but you have entered the wrong discount code");
return false;
}
}
</script>