This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var xhr = new XMLHttpRequest(); | |
xhr.open('GET', imageUrl); | |
xhr.responseType = 'blob'; | |
xhr.onload = function() { | |
var img = document.createElement('img'); | |
img.setAttribute('data-src', imageUrl); | |
img.setAttribute('id', s_id); | |
img.className = 'icon'; | |
var objURL = this._createObjectURL(xhr.response); | |
img.setAttribute('src', objURL); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AppShow.prototype.proc_init = function() { | |
console.log('#proc_init'); | |
var s1='http://kuc-arc-f.github.io/h5_t0604_page/img/p1.png'; | |
var s2='http://kuc-arc-f.github.io/h5_t0604_page/img/p2.JPG'; | |
var s3='http://kuc-arc-f.github.io/h5_t0604_page/img/p3.JPG'; | |
var ctl = new Controller(); | |
var divcont = document.querySelector('div#id-div-img'); | |
var img_t= ctl._requestRemoteImageAddElem( s1, divcont ,'id_img1'); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ctlNews.prototype.load_rss = function( surl ) { | |
var items =new Array(); | |
console.log( 'surl=' + surl ); | |
$.ajax({ | |
url: surl, | |
type: 'get', | |
dataType: 'xml', | |
timeout: 5000, | |
success: function(xml, status) { | |
if (status === 'success') { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function disp_news(items) | |
{ | |
for(var i = 0; i < items.length ; i++){ | |
var body= $('table#id-table1'); | |
var trObj = $('<tr></tr>'); | |
var tdObj = $('<td></td>'); | |
var a_tag = $('<a href="'+ items[i].url +'" target="_blank">'+ items[i].title +'</a>'); | |
var tdObj02 = $('<td align="right"></td>'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function init_item() | |
{ | |
var items = new Array(); | |
items[0] = {snd_name : 's1', snd_url : 'https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/playlists/36209861&color=ff5500&auto_play=true&hide_related=false&show_artwork=true' }; | |
items[1] = {snd_name : 's2', snd_url : 'https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/playlists/36479386&color=ff5500&auto_play=true&hide_related=false&show_artwork=true' }; | |
items[2] = {snd_name : 's3', snd_url : 'https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/playlists/36480994&color=ff5500&auto_play=true&hide_related=false&show_artwork=true' }; | |
return items; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function load_sound( items ) | |
{ | |
if((items ==null) || (items.length < 1)) | |
{ | |
return; | |
} | |
var s_url = get_sound_id(items); | |
console.log('s_url=' + s_url ); | |
var divSound= $('div#id-div-sound1'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<iframe width="100%" height="450" scrolling="no" frameborder="no" | |
src="https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/playlists/36480994&color=ff5500&auto_play=true&hide_related=false&show_artwork=true"> | |
</iframe> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function init_proc() | |
{ | |
if (window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB) { | |
console.log('OK: use indexedDB'); | |
}else{ | |
console.log('NG: use indexedDB'); | |
} | |
var db= new DbHelper(); | |
db.getInstance(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DbHelper.prototype.getInstance = function( ) { | |
var db=null; | |
//open | |
var rq = indexedDB.open(DB_NAME); | |
rq.onupgradeneeded = function(result) { | |
console.log('#onupgradeneeded'); | |
db = this.result; | |
var store = db.createObjectStore(STORE_NAME, { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DbHelper.prototype.proc_addItem = function(item ,view) | |
{ | |
var rq = indexedDB.open(DB_NAME); | |
rq.onsuccess = function(e) { | |
console.log('#onsuccess_open'); | |
var db= e.target.result; | |
var tx = db.transaction(STORE_NAME, 'readwrite'); | |
tx.oncomplete = function() { }; | |
var store = tx.objectStore(STORE_NAME); |