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