1jQuery("input[type='text'][name='quantity']").change(function() {
2 if (parseInt($(this).val(),10) > 40) {
3 alert("To order quantity greater than 40 please use the contact form.");
4 this.value == '';
5 /* or with jQuery: $(this).val(''); */
6 $(this).focus();
7 return false;
8 }
9});