0
嗨我想添加一個效果,在jsp @頁面中心,而我正在執行ajax調用加載我的下拉。加載覆蓋,而Ajax調用jsp頁面
嗨我想添加一個效果,在jsp @頁面中心,而我正在執行ajax調用加載我的下拉。加載覆蓋,而Ajax調用jsp頁面
很難在沒有看到您的代碼的情況下回答您的問題。但是有很多方法可以在javascript中生成「加載」蒙版。這取決於你擁有哪些JavaScript庫。我用一個Ext.LoadMask舉一個例子:
// First param of LoadMask constructor is the element to display the load mask over.
myMask = new Ext.LoadMask(Ext.getBody(), {
msg:"Please wait..."
});
myMask.show();
// Perform ajax call to load data ... something like
xmlhttp=new XMLHttpRequest();
xmlhttp.onreadystatechange=function() {
if (xmlhttp.readyState==4 && xmlhttp.status==200) {
// Your code populates the dropdown with the response ...
// Then hide the mask when data is loaded
myMask.hide();
}
}
xmlhttp.open("GET","http://myurl/data",true);
xmlhttp.send();
你可以發佈你的代碼嗎? – amurra 2011-01-06 15:35:55