/***********************************
* ***** Create Author: Let
* ***** Create datetime: 2011/04/22
* ***** Function description: operation class for opening a new window
***********************************/
Var winOperater = {
DefaultOpenOptions: {// window. open default values
Height: "500px", // window height
Width: "500px", // window degree
Left: "50px", // pixel value between the window and the left side of the screen
Top: "50px", // The pixel value from the window above the screen
Toolbar: "yes", // whether to display the toolbar
Menubar: "yes", // whether to display the menu bar
Resizable: "yes", // whether the window size can be changed
Scrollbars: "yes", // whether to display the scroll bar
Location: "no", // whether to display the address bar
Status: "no" // whether information in the status bar is displayed
},
DefaultShowOptions: {// window. ShowModelDialog default values
DialogHeight: "500px", // dialog height
DialogWidth: "500px", // degree of parallelism in the dialog box
DialogLeft: "PX", // distance from the left of the screen
DialogTop: "100px", // distance from the screen
Resizable: "yes", // whether the size can be changed
Center: "yes", // whether the window is centered
Status: "no", // whether the status bar is displayed
Scroll: "Yes", // indicates whether the scroll bar is displayed in the dialog box.
Help: "no" // whether to display the Help button
},
Winopen: function (URL) {// Open Mode
Window. Open (URL, "newwindow", this. getopenfeature ());
},
Winshowdialog: function (URL) {// mode window opening Mode
VaR OBJ = Window. showmodeldialog (URL, window, this. getshowfeature ());
Return OBJ;
},
Getwinopenobject: function () {// get window. Open parent form object
Return response opener.doc ument;
},
Getwinshowobject: function () {// obtain the window. showmodeldialog parent form object
Return response parent.doc ument;
},
Getopenfeature: function () {// retrieve the number of records set by window. Open
VaR arr = new array ();
For (VAR name in this. defaultopenoptions ){
Arr. Push (name + "=" + this. defaultopenoptions [name]);
}
Return arr. Join (",");
},
Setopenfeature: function (options) {// set the window. Open Parameter
If (Options = NULL) return;
For (var name in this. defaultOpenOptions ){
Var opt = options [name];
If (opt! = Undefined ){
This. defaultOpenOptions [name] = opt;
Delete opt [name];
}
}
For (var optName in options)
Eval ("this. defaultOpenOptions." + optName + "=/" "+ options [optName] + "/"");
},
GetShowFeature: function () {// specify the number of windows. showModelDialog to be retrieved.
Var arr = new Array ();
For (var name in this. defaultShowOptions ){
Arr. push (name + ":" + this. defashowshowoptions [name]);
}
Return arr. join (";");
},
SetShowFeature: function (options) {// set the window. showModelDialog Parameter
If (options = null) return;
For (var name in this. defaultShowOptions ){
VaR opt = options [name];
If (OPT! = Undefined ){
This. defaultshowoptions [name] = OPT;
Delete OPT [name];
}
}
For (VAR optname in options)
Eval ("This. defaultshowoptions." + optname + "=/" "+ options [optname] + "/"");
}
};