弹出框加载页面

页面onclick触发代码:
function selectVoice(obj)
{
//window.location.href="${request.contextPath}/callcenter/toAgentManagePhone.action";
//设置iframe弹出的窗体的iframeId
var url = "${request.contextPath}/callcenter/toAgentManagePhone.action";
listView = new DlgUtil().makePane(url,'<isap:label value="'选择座席电话号码'" />',"160px","100px","350px","400px",null);
listView.show();
var isvQueryResDeal = getQueryResDeal();
isvQueryResDeal.open(listView,getPhoneValue);
}
function getQueryResDeal()
{
/*对应各种资源的处理函数*/
var queryResDeal =
{
handleSubscible:null, //资源订购句柄
handleConnect:null, //关联事件句柄
subResName:null, //资源名
callBack:null,         //回调函数
    deal : function(message)
    {
        if (null != message && message.length > 0 && null != this.callBack)
        {
            this.callBack(message);
        }
        else if(null != this.callBack)
        {
        this.callBack();
        }
    },
    open: function(obj,obj1)
    {
    this.close();
    //动态获取资源名称,资源名称和wigetId相同
    this.subResName = getWidgetId();
    //指定回调函数
this.callBack = obj1;
    //订购资源
    this.handleSubscible = dojoSubscribe(this.subResName, queryResDeal, "deal");

    /*关联obj的关闭事件处理函数*/
    this.handleConnect = dojoConnect(obj, "onHide", null, function(event){
    widgetIdDec();
    queryResDeal.close();
    dojoStopEvent(event);
    });    
    },
    close: function()
    {
    //取消事件关联
    if (null != this.handleConnect)
    {
    dojoDisConnect(this.handleConnect);
    this.handleConnect = null;
    }
    //取消订购
    if (null != this.handleSubscible)
    {
    dojoUnSubscribe(this.subResName, queryResDeal, "deal");
    this.handleSubscible = null;
    }
    }
};

return queryResDeal;
}
  









<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<script type='text/javascript' src='${request.contextPath}/js/frame/dojo/dojo.js'></script>
<script type="text/javascript">

function dojoAddOnLoad(handler)
{
dojo.addOnLoad(handler);
}
//dojo发布事件,将在值传递给订阅该事件的页面
function dojoPublish(topic, args)
{
window.top.dojo.event.topic.publish(topic, args);
closeWidgetWin();
}

//订阅事件,用于弹出窗体时
function dojoSubscribe(topic, context, handler)
{
var B = window.top.dojo.event.topic.getTopic(topic);
return B.subscribe(context, handler);

}
//关闭订阅事件
function dojoUnSubscribe(topic, context, handler)
{
window.top.dojo.event.topic.unsubscribe(topic, context, handler);
}
//设置回调函数
function dojoConnect(obj, event, context, handler)
{
return window.top.dojo.event.connect(obj, event, handler);
}
//关闭回调事件
function dojoDisConnect(handle)
{
window.top.dojo.event.disconnect(handle);
}
//关闭指定事件
function dojoStopEvent(event)
{
window.top.dojo.event.browser.stopEvent(event);
}
//根据widgetId关闭widget对象
function closeWidgetWin()
{
  var jsWidgetId = getWidgetId();
    if (null == jsWidgetId)
    {
        return;
    }
    var curWidget = window.top.dojo.widget.byId(jsWidgetId);
    curWidget.closeWindow();
}

//获取全局变量中的widgetId
function getWidgetId()
{
return window.top.widgetId;
}
//弹出窗体要对widgetId进行增加处理
function widgetIdInc()
{
    if (null == window.top.widgetId)
    {
        window.top.widgetId = "1234";
    }
    else
    {
        window.top.widgetId = parseInt(window.top.widgetId) + 1 + "";
    }
}

//关闭窗口时要将改widgetId消除
function widgetIdDec()
{
    if (null != window.top.widgetId)
    {
        window.top.widgetId = parseInt(window.top.widgetId) - 1 + "";
    }
}
function myclick(param,totalSize,rowsPerPage,currentPage)
{

       var check='<isap:message key="BPO.PAGENATION.NUMBER.CHECK"/>';
       var cofirm='<isap:message key="BPO.COM.BUTTON.COFIRM"/>';
       var over='<isap:message key="BPO.PAGENATION.NUMBER.MAX.OVER"/>';
       var targetPage = document.getElementById("targetPage").value;
       var pattern=/^[1-9][0-9]*$/;
if(!pattern.test(targetPage))
{
    top.myAlertWindow("null", check, cofirm, '3');
    document.getElementById("targetPage").value=currentPage;
    return;
}
var maxPage;
if(totalSize % rowsPerPage == 0)
{
maxPage = totalSize/rowsPerPage;
}
else
{
maxPage = totalSize/rowsPerPage+1;
}
if(targetPage>maxPage)
{
top.myAlertWindow("null", over, cofirm, '3');
document.getElementById("targetPage").value=currentPage;
    return;
}
        document.location.href=encodeURI(param+targetPage);
}
//查询提交时检验每页显示的记录数
function checkPage(rowsPerPage)
{
    var flag = true;
if(rowsPerPage == undefined || rowsPerPage == null)
    {
    var rowsPerPage = "rowsPerPage";
    }
//输入的每页记录数不能大于200,页不能为01、0等格式的数字
var rowsPerPage = document.getElementById(rowsPerPage);

if (rowsPerPage.value > 200 || rowsPerPage.value.substring(0,1) == "0")
{
alert_divMsg('<isap:message key="BPO.COM.CHECK.RANGEERROR"/>','<isap:message key="BPO.TENANT.COMMON.COFIRM"/>',"<isap:message key='BPO.FRAME.NOTICE'/>");
rowsPerPage.focus();
flag = false;
}
else
{
return true;
}

return flag;
}

// 判断密码是否一致
function accordPassword(v_firstPwd , v_secondPwd)
{
    if (v_firstPwd != v_secondPwd)
    {
        alert_divMsg('<isap:message key="BPO.USER.TENANT.ALERT.REPASSWORD"/>','<isap:message key="BPO.COM.BUTTON.COFIRM"/>','<isap:message key="BPO.FRAME.NOTICE"/>');
        return false;
    }
    else
    {
        return true;
    }
}
alert_prompt='<isap:message key="BPO.COM.PROMPT"/>';
</script>

你可能感兴趣的:(弹出框)