Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function dataOnTheFly_initialLoad(element) {
- setTimeout(loadAfterTimeout,1000);
- }
- function LoadAjax(){
- var GetData;
- var serviceURL = "http://bertho.web.id/curl/services21/";
- $.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){
- GetData = data.items;
- $.each(GetData, function(index, MyData) {
- $('#dataList').append(
- '<li><a href="detail.html?id=' + MyData.id + '">' +
- '<h4>'+ MyData.judul +'</h4>' +
- '<p>' + MyData.web + '</p>' +
- '<p>' + MyData.desk + '</p>');
- });
- $('#dataList').listview('refresh');
- },
- error : function(){
- alert('Your Connection Is Trouble')
- }
- });
- }
- function loadAfterTimeout() {
- document.getElementById('waiting').style.display = 'none';
- LoadAjax()
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement