function quotescollection_refresh(instance, exclude) { // function body defined below var mysack = new sack( "/cht/wp-content/plugins/quotes-collection/quotes-collection-ajax.php?refresh="+instance+"&exclude="+exclude ); mysack.execute = 1; mysack.onError = function() { document.getElementById('quotescollection_randomquote-'+instance).innerHTML = 'Error getting quote'; }; mysack.onLoading = function() { document.getElementById('quotescollection_nextquote-'+instance).innerHTML = 'Loading...'; }; mysack.onLoaded = function() { document.getElementById('quotescollection_nextquote-'+instance).innerHTML = '下一則 »'; }; // mysack.onInteractive = function() { document.getElementById('quotescollection_nextquote-'+instance).innerHTML += '...'; }; // mysack.onCompletion = function() { document.getElementById('quotescollection_randomquote-'+instance).innerHTML = mysack.response; }; mysack.runAJAX(); return true; } // end of JavaScript function for randomquote