I have a simple form to check the value of post code entered by the user against a variable,
I\'m trying to disable the submit button and do the check and give alert
The W3C recommends to set that attribute to disabled="disabled", so:
$('#submit_postcode').attr('disabled', 'disabled');
Re-enabling can be done by removing the attribute:
$('#submit_postcode').removeAttr('disabled');
Setting the attribute to any value causes it to be disabled, even .attr('disabled', 'false'), so it has to be removed.