ShowModalDialog and ShowModelessDialog use experience

zhaozj2021-02-11  178

ShowModalDialog and ShowModelessDialog use experience

1. What is the 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 (most is blocked, and it is: p)

Second, how can I make the SHOWMODALDIALOG and SHOWMODELESSDIALOG's super connection not pop up a new window? 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 related code:

reload ... < / a>

Replace FileName.htm with the name of the web page and put it in your open page, press F5 to refresh, pay attention, this is to cooperate with , otherwise you will press F5 to pop up 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. Example: Now you need to read or set a variable var_name in a showmodaldialog (or showmodelessdialog).

General transfer mode: window.showModalDialog ( "filename.htm", var_name) // var_name variable transmission when the showModalDialog (or the showModelessDialog) read and set: alert (window.dialogArguments) // read var_name variable window.dialogArguments = "oyiboy" // Setting the var_name variable can be satisfied, but when you want to operate the second variable virtual var_id at the same time? 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" // Set var_id variable

You 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. The location of 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 the control window

Control the part of the .htm.