私はこれが奇妙に聞こえると思っていますが、それはクライアントが望むものです。私はポップアップ内で作業しており、あるカラム内のDataGridセルをクリックすると、htmlテーブルにデータがポップアップされます。私は表示するために2番目のポップアップがありますが、それはフォーカスを取得しません。これは現在、2番目のポップアップを作成するために使用しているコードです。この2番目のポップアップに焦点を当てるための助けがあれば素晴らしいでしょう。ポップアップでポップアップ、2番目のポップアップにフォーカスがありませんか?
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;
}
EDIT:ソリューション
<script type="text/javascript" language="javascript">
function init() {
window.focus();
}
</script>
'それはどのようなクライアントwants'で動作します - これをよく聞く。恐ろしいウェブページのために= P – Manishearth
はい私は知っている... :( – cjohnson2136
あなたはエラーを受け取りますか(コンソールか火かき棒か...を参照してください) – roel