Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var serviceURL = "http://bertho.web.id/curl/services21/";
- var SistemPakar;
- $('#sispakListPage').bind('pageinit', function(event) {
- CallAjax();
- });
- function CallAjax(){
- showLoad();
- $.ajax({
- type : 'GET',
- url : serviceURL + 'DataReadNP.php',
- async: true,
- beforeSend: function(x) {
- if(x && x.overrideMimeType) {
- x.overrideMimeType("application/j-son;charset=UTF-8");
- }
- },
- dataType : 'json',
- success : function(data){
- StatusSuccess();
- SistemPakar = data.items;
- $.each(SistemPakar, function(index, antara) {
- $('#sispakList').append(
- '<li><a href="detailNowPlaying.html?id=' + antara.id + '">' +
- '<img src="' + antara.img + '"/>' +
- '<h4>'+ antara.judul +'</h4>' +
- '<p>' + antara.web + '</p>' +
- '<p>' + antara.desk + '</p>');
- });
- $('#sispakList').listview('refresh');
- },
- error : function(){
- StatusError();
- }
- });
- }
- function showLoad(){
- $('#loading').show().html('Status : Request Data From Server');
- }
- function StatusError(){
- $('#imgerr').slideDown("slow");
- $('#loading').show().html('Status : Your Connection Is Trouble');
- }
- function StatusSuccess(){
- $('#loading').show().html('Status : Data Has Been Show');
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement