I have this code js that receives two parameters day name what I want is to get them to another page called mad in which I send direct parameters to a service called days so that Bring me the results and paint them on a div called sample
$("#envia").click(function () {
var datos={
dia: $("#nivel").val(),
nombre: $("#curp").val()
};
$.ajax({
url: "mad.php",
type: "GET",
dataType: "json",
data: datos,
success: function (result) {
$("#muestra").html(result);
}
})
});
* this is the js that resides the variables but does not do anything I do not know if I am receiving them well does not mark me any error simply does not show me anything *
$(document).ready(function () {
var datos={
dia: $("#dia").val(),
nombre: $("#nombre").val()
};
$.ajax({
url: 'wservice/dias.php',
type: 'GET',
dataType: 'json',
data: datos,
})
.done(function (respuesta) {
console.log("dia:"+respuesta.dia);
console.log("Nombre:"+respuesta.Nombre);
console.log("a:"+respuesta.a);
)}
)};