function viewLogfile(){ clearInterval(interval_id); $.ajax({ dataType: "json", url: '/log', type: 'REQ' }) .done(function(log){ var markup = TPL.engine.execute_px('log.tpl', log); $('#content').html(markup); }) .fail(function(){}); var markup = '

Logfile

'; $('#content').append(markup); }