I'm using the following function:
$( document ).ready(function() {
var $server;
$server = 'http://localhost/mobile/DatabaseXDK/database/www/';
$('#inclusao').on('click', function(){
$nome = $('#nome').val();
$.ajax({
type: "get",
url: $server+"/conexao.php",
timeout: 3000,
contentType: "application/json; charset=utf-8",
data: "nome="+$nome+"&acao=inclusao",
success: function(data) {
intel.xdk.notification.alert('Pessoa Cadastrada!','Inclusao','ok');
Pessoas();
}
});
});
Until then, beautiful, perfect wheel, but if I put some more field like, surname, it does not include anything in the surname. Look at the function:
$( document ).ready(function() {
var $server;
$server = 'http://localhost/mobile/DatabaseXDK/database/www/';
$('#inclusao').on('click', function(){
$nome = $('#nome').val();
$sobrenome = $('#sobrenome').val();
$.ajax({
type: "get",
url: $server+"/conexao.php",
timeout: 3000,
contentType: "application/json; charset=utf-8",
data: "nome="+$nome+"sobrenome"+sobrenome+"&acao=inclusao",
success: function(data) {
intel.xdk.notification.alert('Pessoa Cadastrada!','Inclusao','ok');
Pessoas();
}
});
});