好吧,我知道這聽起來很奇怪,但這是客戶想要的。我在一個彈出窗口中工作,當用戶點擊某個列中的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>
'是什麼客戶端wants' - 經常聽到這個_too_。爲使網頁可怕= P – Manishearth 2012-03-12 15:18:44
是的,我知道... :( – cjohnson2136 2012-03-12 15:28:10
你得到一個錯誤(見控制檯或螢火蟲或......) – roel 2012-03-12 15:28:56