setInterval("PollingGetInfo()", 5000);
function PollingGetInfo()
{
//alert("shu");
PageMethods.PollingGetInfo(CallbackPolling);
}
function CallbackPolling(result)//ressult是后台放回来的数据
{
if(result!=null)
{
var count=result.length;
var messageString=null;
for(var i=0;i<count;i++)
{
messageString=result[i];
if(messageString!="")
{
var tempMessage=new Array();
tempMessage=messageString.split(",");
ShowMessageBox(tempMessage[0],tempMessage[1],tempMessage[2],tempMessage[3],i);
}
}
}
}
function ShowMessageBox(billName,billCount,billNumber,billUsrl,msgIndex)
{
var msgContent = "您有"+"<font color=#FF0000>"+billCount+"</font>"+"张"+billName+"通知单来了!<br />料单编号:"+billNumber;
var msg = new Message("newMessage",200,120,"系统提示:",msgContent,"点击此处查看");
msg.rect(null,null,null,null);
msg.speed = 10;
msg.step = 1;
msg.show(billUsrl);
}
在上面循环的时候可能要多次调用ShowMessageBox()这个函数,就对弹出多个来,一直闪烁无法操作。希望楼主给我解决方案哦,谢谢了哦。xiejie_1986@126.com
回复 更多评论