簡體   English   中英

嵌套showModalDialog的ie11問題

[英]ie11 issues with Nested showModalDialog

我正在使用許多模式對話框進行輸入的Web應用程序。 當我開始使該應用程序與IE11兼容時,該問題就開始了(在IE8中運行正常)。 從主頁調用時,“模態對話框”可以完美地返回值,但是當我從“模態對話框”創建模態對話框時,該值會返回但不會被捕獲,並被視為undefined

 //calling the values var ret = ShowDialogOpen(pageUrl, width, height); function ShowDialogOpen(PageName, strWidth, strHeight) { var DialogOptions = "Center=Yes; Scrollbar=No; dialogWidth=" + strWidth + "; dialogTop=150px; dialogHeight=" + strHeight + "; Help=No; Status=No; Resizable=Yes;"; var OpenUrl = PageName; var ret = window.showModalDialog(OpenUrl, "Yes", DialogOptions); return ret; } //Dialog returning values function ReturnValues() { var lstBox = document.getElementById("lst_Name"); var texts = ""; var values = ""; for (i=0; i<lstBox.options.length; i++) { texts = texts + lstBox.options[i].text + "!"; values = values + lstBox.options[i].value + "!"; } window.returnValue = texts + "$" + values; Close(); return false; } 

通過主頁使用時,此代碼可以完美地工作,但是當我從“模態對話框”頁面中使用它時, returnValue丟失了。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM