-1

我在页面上有一个“添加”按钮,在单击添加按钮时,我需要使用 portlet 打开另一个 jsp 的透明弹出窗口。这怎么可能..?

    <script>
function createXMLHttpRequestObject() {
    var xmlHttp;
    try {
    xmlHttp = new XMLHttpRequest();
    } catch (e) {
    try {
        xmlHttp = new ActiveXObject("Microsoft.XMLHttp");
    } catch (e) {
    }
    }
    if (!xmlHttp)
    alert("Error creating the XMLHttpRequest object.");
    else
    return xmlHttp;
}

var xmlHttp = createXMLHttpRequestObject();
function makeResourceCall(params,call){
    if (xmlHttp){
    try{
        xmlHttp.open("POST", "<portlet:resourceURL/>", false);
    // xmlHttp.onreadystatechange = handleRequestStateChange();
        xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
        xmlHttp.setRequestHeader("Content-length", params.length);
        xmlHttp.setRequestHeader("Connection", "close");
        xmlHttp.send(params);
        if(call == "componentPopUp"){
        componentDetailsDivFormation(xmlHttp);
        }
        if(call == "ibasePopUp"){
        IbaseDetailsDivFormation(xmlHttp);
     }
        if(call == "scheduleDetailsPopUp"){
        scheduleDetailsDivFormation(xmlHttp);
        }
        }catch (e){
        alert("Can't connect to server:\n" + e.toString());
    }
}
}
</script>        

如何添加此代码,以便在单击按钮时出现透明弹出窗口?

4

1 回答 1

0
window.open("page.html","Page","menubar=no, status=no, scrollbars=no, menubar=no, width=200, height=100");

打开一个弹出窗口: 1. 文件 2. 窗口名称 3. 选项

于 2013-07-04T04:27:27.957 回答