1
I want to do a validation in Mysql Database through Ajax. I created a function called validaCNPJ() that is in the controller called Default.
But I don’t know how to put this function in the parameters of Ajax. Someone can give me the path of the stones?
This is my Script that is on the HTML page:
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.2/jquery.min.js"></script>
<script>
$(document).ready(function(){
$("idCnpj").typehead(function(){
$.ajax({url: "???????? ", success: function(result){
$("#div1").html(result);
}});
});
});
</script>