Advertisement
joris

Javascript Sample

Oct 16th, 2012
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. for ( var i = 0; i < response.length; ++i ) {
  2.         str = response[i].judul;
  3.         str2 = response[i].waktu_mulai;
  4.         str3 = response[i].channel_code;
  5.                    
  6.  
  7.         var Year,Month,Date,Time,Strip,Join= ""
  8.                    
  9.         var Year    = str2.substr(0,4)
  10.         var Month   = str2.substr(5,2)
  11.         var Date    = str2.substr(8,2)
  12.         var Time    = str2.substr(-8,8)
  13.         var Strip   = str2.substr(4,1)
  14.                    
  15.         var Join    = Date+Strip+Month+Strip+Year+' '+Time
  16.  
  17.         listItem = document.createElement('div');
  18.         listItem.setAttribute('data-bb-type', 'item');
  19.         listItem.setAttribute('data-bb-img', 'images/icons/logo/'+str3+'.png');
  20.         listItem.setAttribute('data-bb-title', str);
  21.         listItem.innerHTML = Join+" WIB";
  22.         container = document.createElement('div');
  23.         container.appendChild(listItem);
  24.         bb.imageList.apply([container]);
  25.         dataList.appendChild(container.firstChild);  
  26.             if (bb.scroller) {
  27.                 bb.scroller.refresh();
  28.             }
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement