I'm looking to do a validation on the MySQL Bank via Ajax. I created a function called validaCNPJ () which is in the controller called Default .
But I do not know how I put this function in the Ajax parameters. Can anyone 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>