I started to study javascipt now and I need to pass two variables to a sum method with getJSON and I do not know how to do it. I created my app with Intel XDK, the server I created with delphi xe2 using datasnap.
I tried these two ways and I could not.
//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');
}
});
});
Can anyone help me?