ShowModalDialog and ShowModelessDialog use experience

xiaoxiao2021-03-06  84

SHOWMODALDIALOG and ShowModelessDialog have a difference between SHOWMODALDIALOG and SHOWMODELESSDIALOG? ShowModalDialog: The input focus will always be kept after being opened. Users cannot switch to the main window unless the dialog is turned off. Similar to the operation of Alert. SHOWMODELESSDIALOG: After being opened, the user can randomly switch the input focus. There is no impact on the main window (up to block being blocked .: P), how to let the SHOWMODALDIALOG and SHOWMODELESSDIALOG's super connections do not pop up new windows? Plus and . Third, how do you only refresh the contents of ShowModalDialog and ShowModelessDialog? In ShowModalDialog and ShowModelessDialog, you cannot press F5 to refresh, and you can't pop up menu. This can only rely on JavaScript, the following is the relevant code: Reload ... replaces the file with the name of the web page and put it in the page you open, you can refresh it, pay attention, pay attention, this is to match Used, otherwise you will pop up the new window. Fourth, how to turn off the window opened with SHOWMODALDIALOG (or ShowModelessDialog) with JavaScript. Always open a new IE window, then turn off. 5. ShowModalDialog and ShowModelessDialog Data Transmission Skills. (Author: I originally wanted to write in a question, but I can't think of this, so I have this.) This thing is more trouble, I have changed several times, I don't have no way to understand (language level Getting worse), I have to use an example. Examples: In one now needs to read the showModalDialog (or the showModelessDialog) or provided in a general variable var_name transfer mode: window.showModalDialog ( "filename.htm", var_name) // pass the showModalDialog var_name variable (or the showModelessDialog) and read When set: Alert (window.dialogarguments) // reads var_name variables Window.dialogarguments = "oyiboy" // Setting var_name variable This method can be met, but when you want to operate the VAR_NAME to operate the second migration What about VAR_ID? It is no longer possible to operate.

This is the limitations of this transmission method. The following is the way I suggest it: Window.ShowModalDialog ("FileName.htm", Window) // No matter what variable is to be operated, only the Window object that only passes the main window in ShowModalDialog (or showmodelessDialog) Read and set: Alert (window.dialogarguments.var_name) // read var_name variables window.dialogarguments.var_name = "oyiboy" // Set the var_name variable while I can also operate the var_id variable Alert (window.dialogarguments.var_id) // read the var_id variable Window. Dialogarguments.var_id = "001" // Sets the var_id variables can also operate any object of the main window, such as the element in the form object. Window.dialogarguments.form1.index1.value = "This is the value of the index1 element" Sixth, multiple ShowModelessDialog interoperability. Because the light said is very hard, I will peek, I will use the code directly. If I don't understand, I will be directly letted (Oyiboy # 163.net (please send # @@) when using it.. The main role of the following code is to move a showmodelessDialog in a showmodelessdialog. Site JS code for the main file. VAR S1 = ShowModelessDialog ('Control .htm', Window, "Dialogtop: 1PX; Dialoglet: 1PX") // Open Control Window Var S2 = ShowModelessDialog ('About: Blank', Window, "Dialogtop: 200px; Dialoglet: 300px" // Open partial code for control .htm control. HTM.