Author:
Game.19xz
source:
19xz.com
The Non-Mode dialog is a window form of IE. After opening the Non-Mode dialog, the Motorpse window does not continue to parse its HTM code before it is turned off, and the Motorpity window will not be selected.
The main adjustment window is transmitted with the information of the non-mode window. Function call delivery mode vreturnValue = WINDOW.SHOWMODELESSDIALOG (SURL [, Varguments] [, SFEATURES])
The main adjustment window passes the parameter to the non-mode window via the second parameter Varguments of the ShowModelessDialog method, which may be an array or a DOM object. Non-mode windows pass through Window.Dialogarguments, if an array, use Window.Dialogarguments [i] to reply to the number of i-quall of the array to return the value to the main window, this value via Window.ReturnValue The return value of the ShowModelessDialog method is received by the hometery window.
2. Window Operation Password Non-Mode Window Passing the Window Object Directly Manipulating the Motor Window This time, ShowModelessDialog needs to pass the Window object of the Motor window as a parameter. You can get the main window in the non-mode window. Window reference, with scripts can be manipulated directly.
Such as the call code of the main window is as follows: ShowModelessDialog ("MyDialog.htm", Window, "Status: False; DialogWidth: 300px; DialogHeight: 300px; Edge: rased; Enter: YES; Help: no; resizable: NO; status: NO ");
Non-mode window JScript code is as follows, you can receive the window object VAR SDATA = Window.dialogarguments for the main window; then operate any variables and functions of the main chart window, as follows: sdata.susername = 'value from modelessdialog'; / / SUSERNAME is the global variable sdata.fnUpdate (); // fnupdate is a function of the Motor, and the SUSERNAME variable is processed in this function.
In this way, the main adjustment window may not obtain the numerical value set by the non-mode window by normal return value.
Note: Incorporate the Window Object of the Motor Window into a non-mode window is a very flexible means of operation. But in practice, the window object can only be the Motor-tuning window, you cannot pass the Window object of other frames (non-home window) through the DOM object structure. However, in the non-mode window, according to the Window object of the incoming main window, any object is referenced to the non-maintable window through the DOM object structure.