Google does not support the showModalDialog solution.
Suddenly found that Chrome version 37.0.2062.103 m does not support showModalDialog modal dialog box and cannot return returnValue
Projects used previously cannot be executed normally.
I found a compromise and used window. open to replace showModalDialog to operate the elements of the parent page using window. open instead of showModalDialog.
window.open("xsp/exesp?todo=13","","height=500,width=280,status=yes,toolbar=no,menubar=no,location=no");
New window
window.close(); window.opener.document.getElementById("classid").value=treeid; window.opener.document.getElementById("classname").value=treename;
Windowshowmodaldialog cannot obtain the return value in Firefox and Google browsers.
Hello! I'm glad to answer your questions!
Parent page:
Function openwindows () {var obj = new Object (); // open the modal subform and obtain the return value var retval = window. showModalDialog ("ordervideo. jsp? RderIds = "+" 0010,0020, 0030 ", obj," dialogWidth = 500px; dialogHeight = 500px "); // for chrome if (retval = undefined) {retval = window. returnValue;} alert (retval );}
Subpage:
Function onload () {// for chrome if (window. opener! = Undefined) {// window. the value of opener is not empty in Google's browser. It is undefined in IE/Firefox to determine whether it is Google's browser window. opener. returnValue = flag; // window used to assign a value to the return value in Google's browser. opener. close (); // you must close it once. Otherwise, run the following window. close () cannot close the pop-up window, because the pop-up window in Google browser is a new window} else {window. returnValue = flag; // This assignment method is compatible with IE/Firefox, but does not support Google's browser} window. close ();}
You can learn more in the Firefox community. I hope my answers will be helpful to you. If you have any questions, please continue to consult on this platform.
Firefox enterprise Platform [Official Certification]
How to disable js control in Google browser in the subwindow of showModalDialog
Go to csdn and find the csdn blog. You can find the relevant information for download.
Website: www.csdn.net
Download: download.csdn.net
~ Blog: blog.csdn.net