0
I started to study javascipt now and I need to pass two variables to a sum method with getJSON and I don’t know how to do it. I created my app with XDK Intel, the server created with Delphi xe2 using datasnap.
I tried these two ways and I couldn’t.
//alert('acessou a rotina');
$.get(urlSoma).then(function(data){
alert(data);
//$("#iptResult").val();
//$("#iptResult").val(data.result);
}).fail(function(jqXHR,status,error){
alert(error);
});
$.ajax({
url: urlSoma,
type: 'GET',
dataType: 'json',
data: {x: pX},
success: function(json){
alerta('fungo');
},
error: function(json){
alert('erro');
}
});
});
Someone can help me?