i have been looking for more than two days now for an answer to this issue and no luck at all. Im trying to use ajax with jquery and cakephp. I am using this jquery function:
$("#pais").change(function(){
$.ajax({ data: "id=" + document.getElementById('pais').value,
type: "GET",
url: "http://localhost/facebook/Countries/getTeam/",
success: function(data){
$('#cuadro').show();
pais();
}
});
});
I need to send 1 value for my controller's function "getteam($id= null)" but when i check with firebug what im actually sending i can see that it ads "?id=4" and i need to have something like /controller/action/id.
how do you get this with jquery?