Ext.onReady(function() {

    Ext.Ajax.request({
        url     : 'http://www.chinoichiba.org/php/school_data.php?mode=notice',
        success : function(res) {
            var notice = Ext.util.JSON.decode(res.responseText);
            var tplNotice = new Ext.XTemplate(
                '<table class="table">',
                '<tpl for="notice">',
                    '<tr>',
                        '<th>',
                            '<div class="th">',
                                '<span style="color:#000000;">{publisheddate}</span>',
                            '</div>',
                        '</th>',
                        '<td>',
                            '<tpl for="information">',
                                '<div class="balloon">',
                                    '<span style="color:#000000;">{value}</span>',
                                '</div>',
                            '</tpl>',
                        '</td>',
                    '</tr>',
                '</tpl>',
                '</table>'
            );
            var htmlNotice = tplNotice.apply(notice);
document.getElementById('notice').innerHTML = htmlNotice;
/*
            var tplNotice = new Ext.DomHelper.createTemplate(htmlNotice);
            if(notice != null) {
                for(var i=0; i<notice.length; i++) {
                    var row = notice[i];
                    tplNotice.append('notice',row);
                }
            }
*/
        },
        failure : function(res) {}
    });
});
