Skip to content

Spark-sai/REGISTER-AJAX

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

REGISTER-AJAX

function validate_uomModel() { var val = $("#UomModel").val(); var exp = /^[A-Z-\s]{4,8}$/; if(val=='') { $("#uomModelError").show(); $("#uomModelError").html("Model can not be empty"); $("#uomModelError").css("color","red"); uomModelError = false; } else if(!exp.test(val)) { $("#uomModelError").show(); $("#uomModelError").html("Model is not vaild"); $("#uomModelError").css("color","red"); uomModelError = false; } else { //ajax call start $.ajax({ url : 'validate', data: {'model':val}, success:function(resTxt) { if(resTxt=='') { //no error $("#uomModelError").hide(); uomModelError = true; } else{ $("#uomModelError").show(); $("#uomModelError").html(resTxt); $("#uomModelError").css("color","red"); uomModelError = false; } } }); //ajax call end

            }
            return uomModelError;
        }

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published