在弹出窗口中弹出,第二个弹出窗口没有焦点?
问题描述:
好吧,我知道这听起来很奇怪,但这是客户想要的。我在一个弹出窗口中工作,当用户点击某个列中的datagrid单元格时,它将弹出一个包含数据的html表格。我有第二个弹出窗口显示,但它没有得到重点。这是目前我用来创建第二个弹出窗口的代码。任何帮助将焦点放在第二个弹出窗口上会很棒。在弹出窗口中弹出,第二个弹出窗口没有焦点?
function onCellClick() {
var cmGrid = igtbl_getGridById("countermeasureDetailsGrid");
var cmCellID = cmGrid.ActiveCell.split("_");
if (cmCellID[3] === "3") {
var countermeasureID = igtbl_getCellById("countermeasureDetailsGrid_rc_" + cmCellID[2] + "_0").getValue();
var recordType = igtbl_getCellById("countermeasureDetailsGrid_rc_" + cmCellID[2] + "_4").getValue();
_crfPopupWindow = new crfPopupWindow(countermeasureID, recordType);
_crfPopupWindow.open();
_crfPopupWindow.focus();
}
}
function crfPopupWindow(countermeasureID, recordType) {
var crfPopup = new WindowDef();
crfPopup.target = "CRF_Popup.aspx?countermeasureID=" + countermeasureID + "&" + "recordType=" + recordType;
crfPopup.windowName = "CRFPopup";
crfPopup.toolBar = "no";
crfPopup.resizable = "yes";
crfPopup.scrollbars = "yes";
crfPopup.location = "yes";
crfPopup.width = 350;
crfPopup.height = 400;
return crfPopup;
}
编辑:解
<script type="text/javascript" language="javascript">
function init() {
window.focus();
}
</script>
答
window.focus在页面加载这个工程
答
你检查了第二个弹出具有较高的z-index CSS property?
首先弹出式可以有,比方说,1000 z-index的,但第二个应该有那么1001
+0
这第二个弹出窗口出现在原始窗口的前面,但仍然隐藏在第一个弹出窗口之后,我将第一个弹出窗口中的z-index设置为10,第二个弹出窗口设置为11 – cjohnson2136 2012-03-12 15:37:17
'是什么客户端wants' - 经常听到这个_too_。为使网页可怕= P – Manishearth 2012-03-12 15:18:44
是的,我知道... :( – cjohnson2136 2012-03-12 15:28:10
你得到一个错误(见控制台或萤火虫或......) – roel 2012-03-12 15:28:56