我從我的函數中獲得所需的功能有點麻煩...基本上,我做了兩個調用AJAX函數(由Oracle APEX提供,所以我不能改變這些),但他們需要一段時間。我想在動作正在進行時顯示標準的AJAXy旋轉GIF,但我沒有太多的運氣。這是我到目前爲止有:在我的下一個Javascript函數被調用之前,如何讓瀏覽器更新?
function paginate(reportIDs, startRecord)
{
//block access to the UI and show a "please wait" message
$.blockUI({ css: {
border: 'none',
padding: '15px',
backgroundColor: '#000',
'-webkit-border-radius': '10px',
'-moz-border-radius': '10px',
opacity: .5,
color: '#fff'
} });
//make the two AJAX calls to the APEX provided function
for(var i = 0;i<reportIDs.length;i++)
{
$a_report(reportIDs[i], startRecord, ITEMS_PER_PAGE, ITEMS_PER_PAGE);
}
//clean up some APEX garbage on the page
formatPage();
//make the "please wait" message go away
$.unblockUI;
}
我目前遇到的具體問題是,用戶界面的阻塞似乎一旦Ajax調用完成後只發生。那麼它永遠不會阻止......任何想法?
完美延緩這種方法!謝謝! – 2010-02-02 17:08:32