This function is called when I submit the page if the record exits I want page will not submit .. But it is not working..
function checkvalidation(){
var err=true;
var party_id = $('#party_id').val();
var item_id = $('#item_id').val();
var typ =$('#type').val();
$.post("<?= base_url() ?>checkduplicate.php?item="+item_id+"&party="+party_id+"&type="+typ,function(r){
if(r != "")
{
err = false;
}
});
return err;
}