我在页面上有一个“添加”按钮,在单击添加按钮时,我需要使用 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>
如何添加此代码,以便在单击按钮时出现透明弹出窗口?