41 lines
1.8 KiB
Plaintext
41 lines
1.8 KiB
Plaintext
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ProgressBox.ascx.cs" Inherits="FineUIPro.Web.Controls.ProgressBox" %>
|
||
|
||
<script src="../res/extjs/ext.js" type="text/javascript"></script>
|
||
<script src="../res/extjs/lang/zh_CN.js" type="text/javascript"></script>
|
||
<script type="text/javascript">
|
||
|
||
var yesShowDe = new Number(0);
|
||
var urls = "<%=this.PageUrl %>?getValue=1 "; //ajaxguagedemo.aspx?guage=1";
|
||
var tID;
|
||
function returnResponse() {
|
||
var xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
|
||
xmlHttp.open("GET", urls, true);
|
||
xmlHttp.onreadystatechange = function () {
|
||
if (xmlHttp.readyState == 4) {
|
||
temp = xmlHttp.responseText;
|
||
//alert(temp);
|
||
var maxInt = temp.toString() == "" ? 1 : new Number(temp.toString().split(",")[1]);
|
||
var valueInt = temp.toString() == "" ? 0 : new Number(temp.toString().split(",")[0]);
|
||
if (valueInt < maxInt) {
|
||
if (yesShowDe == 0) {
|
||
Ext.MessageBox.progress("请等待", "数据处理进度...");
|
||
yesShowDe = 1;
|
||
}
|
||
|
||
Ext.MessageBox.updateProgress(valueInt / maxInt,
|
||
'正在处理进度' + Number(valueInt / maxInt * 100).toFixed(2).toString() + '%,' + valueInt.toString() + '/' + maxInt.toString());
|
||
//returnResponse();
|
||
tID = setTimeout("returnResponse();", 50);
|
||
}
|
||
else {
|
||
Ext.MessageBox.hide();
|
||
clearTimeout(tID);
|
||
yesShowDe = 0;
|
||
Ext.MessageBox.alert("提示", "处理成功!"); //提示信息,新加的,可无
|
||
}
|
||
}
|
||
}
|
||
xmlHttp.send(urls);
|
||
}
|
||
</script>
|