- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
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();
});
1 解決策
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
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
コピーされたリンク
3 返答(返信)
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
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
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
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
})