I have the following code attached to a Save button on my form:
$('#btnSave').click(function() {
$('input[type="text"].requiredText').each(function(){
if (this.value == '' || this.value == 'Required'){
$('#lblUserMessage').text('You must enter all Required items.');
$('#lblUserMessage').css({'color':'red', 'font-size':'125%'});
jqDialog.notify("<BR />You must enter all REQUIRED items.<BR />Please try again.", 10);
return false;
}
});
On the form I have input text boxes assigned class "requiredText" and if the user has not filled in the data or has left it blank, I want to dislay the dialog and disable the postback. The above code displays the dialog but also proceeds with the post back. I thought the "return False" would stop the post back.
Any help appreciated,
TIA,
John