// Save the following code. The parameter used by Window.Open is provided // system.window.js // Specific function to see the corresponding annotation
/ ** Call: Object.window * Role: Window Reference Class * Parameters: * Method Window Open Way * HREF Window Address * Name Window Tag * Toolbar Display Tools YES / No * MenuBar Show menu bar YES / NO * SCROLLBAR Show Scroll YES / NO * URLBAR Display address bar YES / NO * STATUS display status bar yes / no * fullscreen full screen window YES / no * resize reset window size YES / no * width window width YES / no * height window height YES / NO * Place the window position center / top / openpop * ReturnValue return value * TextValue text display * ConfirmTrue acknowledge back * ConfirmFalse cancel return * the Params parameters * returns: * / function window () {var Method; var Params; var Splits; var Href; var Name; var ToolBar; var MenuBar; var ScrollBar; var UrlBar; var Status; var FullScreen; var Resize; var Width; var Height; var Place; var Top; var Left; var ReturnValue; var TextValue; var ConfirmTrue; var ConfirmFalse ;
THIS.METHOD = params; this.splits = splits; this.href = href; this.Name = name; this.toolbar = Toolbar; this.Menubar = menubar; this.scrollbar = scrollbar; this. Urlbar = urlbar; this.status = status; this.ffullscreen = fullscreen; this.resize = resize; this.width = width; this.height = height; this.Place = place; this.top = top; this.Left = Left; this.returnValue = returnvalue; this.textValue = textValue; this.confirmtrue = confirmtrue; this.confirmfalse = confirmfirse;}
Window.prototype.init = function () {this.method = this.method? This.method: "open"; this.Params = this.Params? This.Params: ""; this.splits = this.splits? This.splits = this.splits? This.splits = this.splits? This.splits = this.splits? This.splits = this.splits? This .Splits: "|"; this.href = this.href? This.href: "about: blank"; this.name = this.name?this.name:math.Round (Math.random () * 100000); THISTOOLBAR = this.toolbar? this.toolbar: "no"; this.menubar = this.Menubar? this.menubar: "no"; this.scrollbar = this.scrollbar? this.scrollbar: "no"; this. Urlbar = this.urlbar? This.urlbar: "no"; this.status = this.status? This.status: "no"; this.ffullscreen = this.fullscreen? This.ffreen: "no"; this.resize = This.resize: "no"; this.width = this.width? this.width: PARSEINT (Screen.width / 2); this.height = this.Height? this.Height: parseint (Screen.height) / 2); this.Place = this.Place?this.Place:"center "; this.top = this.top?this.top:"30"; this.Left = this.Left? This.Left: "30 "; This.ReturnValue = this.ReturnValue? This.ReturnValue:" "; this.textvalue = this.textValue? This.textValue:" "; this.confirmtrue = this.confirm True? This.confirmtrue: True; this.confirmfalse = this.confirmfirse? This.confirmfalse: false;}
Window.Prototype.Open = function () {// .tolowercase () Switch (this.meth) {/ * * Category: Open * Function: All functions in the Window.open pop-up window; * / case "open": IF This.Place == "center") {OpenWintopxy = "TOP =" (Screen.availHeight-this.Height) / 2) ", Left =" (Screen.availwidth-this.width) / 2) } Else if (this.Place == "TOP") {openwintopxy = "top = 0, left = 0";} else {openwintopxy = "TOP =" this.top ", left =" this.left " "; WINDOW.OPEN (THIS.HREF," this.name "", "location = no; toolbar =" this.toolbar ", menubar =" this.menubar ", scrollbars =" this.scrollbar ", resizable =" this.resize ", Directories =" this.urlbar ", Fullscreen =" this.ffullscreen ", status =" this.status ", titlebar = no, width =" this.width " Height = " this.height ", " OpenWintopxy " "); Break;
/ * * Type: showModlDialog * Function: conversation window * / case "showModalDialog": var DialogObj; DialogObj = window.showModalDialog (this.Href, "", "dialogWidth: '" this.Width "'; dialogHeight: '" this.height "; status: '" this.status "; scroll ='" this.scrollbar "'; help: no"); Return (" DialogoBJ "); Break;
/ * * Category: Showhelp * Function: Help Help * / Case "Showhelp": window.showhelp (this.href); Break;
/ * * Category: confirm * Features: Confirmation dialog * / case "confirm": var msgbox = window.confirm (this.textValue); if (msgbox) {eval (this.confirmtrue);} else {EVAL (this. CONFIRMFALSE);} Break; case "popup": if (this.ie) {this.poptop = 50; this.opopup = window.createPopup (); var html = this.textValue; this.opopup.Document.body.innerhtml = HTML; POPSHOW ();} Break;
/ * * Category: Default status * Features: Current page forwarding * / default: Top.Location = this.href; Break;}}
//// The following is the called page file //