Validation not working
Posted: 2013-07-27 04:11
hello,
I am trying to block updates to records if "UpdateAllowed" field contains "No" as value.
I have inserted the code inside PHP file common.js.php under "function MainTable_validateData()" after all validation commands,but the code is not working. Don't know why. any help?
I am trying to block updates to records if "UpdateAllowed" field contains "No" as value.
I have inserted the code inside PHP file common.js.php under "function MainTable_validateData()" after all validation commands,but the code is not working. Don't know why. any help?
Code: Select all
if($('UpdateAllowed').value=='No'){
Modalbox.show('<div class="Error" style="width: 90%; margin: 0;">You can\'t Update anymore!</div>',
{
title: "Update Blocked!",
afterHide: function(){ $('UpdateAllowed').focus(); }
}
);
/* returning false stops form submission */
return false;
};