- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hi im trying to add info to a data base whit PHP it works in the DB i get the new register but it doesn't show the alert massage confirming that was all ok.
$( document ).ready(function() {
var $server;
$server = 'http://localhost:8888/registro/www/';
$('#inclusao').on('click', function(){
$id = $('#id').val();
$nome = $('#nome').val();
$sobrenome = $('#sobrenome').val();
$.ajax({
type: "get",
url: $server+"/conecta.php",
data: "id="+$id+"&nome="+$nome+"&sobrenome="+$sobrenome+"&acao=inclusao",
success: function(data) {
intel.xdk.notification.alert('Usuário Cadastrado!','Aviso!','OK');
Lista();
}
});
});
function Lista(){
$.ajax({
type: "get",
dataType : 'html',
url: $server+"/conecta.php",
data: "acao=listarusuario",
success: function(data) {
$('#listarusuario').html(data);
}
});
}
Lista();
});
- Tags:
- HTML5
- Intel® XDK
1 Solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Nicolas,
intel.xdk.notification api is deprecated, you should use another way to display an alert.
Take a look if the framework you are using provides dialogs. For testing purposes the simple javascript alert() may work.
Regards,
Diego
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Nicolas,
intel.xdk.notification api is deprecated, you should use another way to display an alert.
Take a look if the framework you are using provides dialogs. For testing purposes the simple javascript alert() may work.
Regards,
Diego
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
thanks diego =)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
And you should have a failure handler as well.
$.ajax( {options} ) //<-- same options, except no success handler .fail(function(er){ // do something }) .then(function(data) { //this is the success handler })
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page