Properties

._content. Returns a reference to the content element in the current window. Standard: Gecko.

.closed. Retrieves Boolean whether the referenced window is closed. Standard: Internet Explorer.

.defautStatus. Sets or retrieves the default value shown in the status bar. Contrast with .status. Standard: Most browsers.

.dialogArguments. Retrieves the variable or array of variables passed into a showModalDialog() or showModelessDialog() window. Standard: Internet Explorer.

.dialogHeight, .dialogLeft, .dialogTop, and .dialogWidth. Sets or retrieves the corresponding coordinate relative to the screen of the showModalDialog() or showModelessDialog() window. Please specify the units. EGs: 3px or 3em. Standard: Internet Explorer.

.frameElement. Retrieves the frame or iframe object that is hosting the window in the parent document. Standard: Internet Explorer.

.innerHeight and .innerWidth. Sets or retrieves the corresponding coordinate of the content area of the browser including the scrollbar, if present. Standard: Gecko.

.length. Sets or retrieves the number of objects in a collection, in this case the number of frames in the window. Standard: Most browsers.

.name. Sets or retrieves the name of the window or frame. Standard: W3C.

.offscreenBuffering. Sets or retrieves whether objects are drawn offscreen before being made visible to the user. Possible values: "auto", true, or false. Standard: Internet Explorer.

.opener. Sets or retrieves a reference to the window that created the current window, frame, or iframe. This property is only available from a page opened via window.open(). Standard: Most browsers.

  • You can do fun stuff like have winA open winB, then have winB close winA via opener.close();.

.outerHeight and .outerWidth. Gets/sets the height and width of the outside of the browser window. Standard: Gecko.

.pageXOffset and .pageYOffset. Gets the amount of content that has been hidden by scrolling to the right and down. Standard: Gecko.

.parent. Retrieves the parent of the window in the object (window or frame (subframe)) hierarchy. For a frame, this is the window that contains the frameSet. Standard: Most browsers.

.prompter Returns a reference to the prompt window, if any, currently displayed. Standard: Gecko.

.returnValue. Sets or retrieves the value returned from the showModalDialog() or showModelessDialog() window. Standard: Internet Explorer.

.screenX and .screenY. Returns the distance between the upper-left-corner of the user's browser from the upper-left-corner of the screen. Standard: Gecko.

.screenLeft and .screenTop. Retrieves the x and y coordinate of the upper left-hand corner of the browser's client area, relative to the upper left-hand corner of the screen. Standard: Internet Explorer.

.scrollX and .scrollY. Returns the number of pixels that the document has already been scrolled horizontally and vertically. Standard: Gecko.

.self. Retrieves a reference to the current window or frame. Standard: Most browsers..

.status. Sets or retrieves the message in the status bar at the bottom of the window. Contrast with .defaultStatus. Standard: Most browsers.

.statusbar [visible=true|false]. Sets or retrieves whether the status bar is visible. Standard: Netscape.

.toolbar [visible=true|false]. Sets or retrieves whether the tool bar is visible. Standard: Netscape.

.top. Retrieves the topmost ancestor window in the hierarchy. Standard: Most browsers.

.window. Returns a reference to the current window. Standard: Gecko.

Collections

.Components. Returns an array of the components installed in the browser. Standard: Gecko.

.controllers. Returns the XUL controller objects for the current chrome window. Standard: Gecko.

.frames. An array object for each frame (subframe) in the window in their order of appearance. Standard: Most browsers.

Events

onactivate. Fires when the object is set as the active element. Standard: Internet Explorer.

onafterprint. Fires on the object immediately after its associated document prints or previews for printing. Standard: Internet Explorer.

onbeforedeactivate. Fires immediately before the activeElement is changed from the current object to another object in the parent document. Standard: Internet Explorer.

onbeforeprint. Fires on the object before its associated document prints or previews for printing. Standard: Internet Explorer.

onbeforeunload. Fires prior to a page being unloaded. Standard: Internet Explorer.

onblur. Fires when the object loses the input focus. Standard: W3C.

oncontrolselect. Fires when the user is about to make a control selection of the object. Standard: Internet Explorer.

ondeactivate. Fires when the activeElement is changed from the current object to another object in the parent document. Standard: Internet Explorer.

onerror. Fires when an error occurs during object loading. Standard: Internet Explorer.

onfocus. Fires when the object receives focus. Standard: W3C.

onhelp. Fires when the user presses the F1 key while the browser is the active window. Standard: Internet Explorer.

onload. Fires immediately after the browser loads the object. Standard: W3C.

onmove. Fires when the object moves. Standard: Internet Explorer.

onmoveend. Fires when the object stops moving. Standard: Internet Explorer.

onmovestart. Fires when the object starts to move. Standard: Internet Explorer.

onresize. Fires when the size of the object is about to change. Standard: Internet Explorer.

onresizeend. Fires when the user finishes changing the dimensions of the object in a control selection. Standard: Internet Explorer.

onresizestart. Fires when the user begins to change the dimensions of the object in a control selection. Standard: Internet Explorer.

onscroll. Fires when the user repositions the scroll box in the scroll bar on the object. Standard: Internet Explorer.

onunload. Fires immediately before the object is unloaded. Standard: W3C.

Methods

.alert([strMessage]). Makes a message box, i.e. a dialog box containing an application-defined message. In client-side VBScript, you can also use the MsgBox() function. Standard: Most browsers.

.attachEvent(strEvent,function). Binds the specified function to an event, so that the function gets called whenever the event fires on the object. Standard: Internet Explorer.

.blur(). Causes the element to lose focus and fires the onblur event. Standard: W3C.

.clearInterval(intervalID). Cancels the interval previously started using the setInterval() method. Standard: Internet Explorer.

.clearTimeout(timeoutID). Cancels a time-out that was set with the setTimeout() method. Standard: Internet Explorer.

.close(). Closes the current browser window or HTML Application (HTA). EG: <a href="javascript:window.close()">Close Window</a>. Standard: Most browsers.

.confirm([strMessage]). Displays a confirmation dialog box that contains an optional message as well as OK and Cancel buttons. Returns true or false. Standard: Internet Explorer.

.createPopup([vntArguments]). Creates a popup window. Standard: Internet Explorer.

.detachEvent(strEvent,function). Unbinds the specified function from the event, so that the function stops receiving notifications when the event fires. Standard: Internet Explorer.

.execScript(strScript,strScriptLanguage). Executes the specified script in the provided language. Standard: Internet Explorer.

.focus(). Causes the element to receive the focus and executes the code specified by the onfocus event. Standard: Internet Explorer.

.moveBy(intXPixels,intYPixels). Moves the screen position of the window by the specified x and y offset values. Standard: Internet Explorer.

.moveTo(intXPixels,intYPixels). Moves the screen position of the upper-left corner of the window to the specified x and y position. Standard: Internet Explorer.

.navigate(strURL). Loads the specified URL to the current window.

.open([strURL][,strWindowName][,strFeatures][,blnReplace]). Opens a new window, loads the document specified by a given URL, and returns a reference to the new window object.

  • strURL is a string that specifies the URL of the document to display. If no URL is specified, a new window with about:blank is displayed.
  • strWindowName is a string that specifies the target.
    • _blank . In a new, unnamed window. The default. Standard: Most browsers.
    • _media . In the HTML content area of the Media Bar. Standard: Internet Explorer 6+.
    • _parent. In the current frame's parent, otherwise just like _self . Standard: Most browsers.
    • _search . In the browser's search pane. Internet Explorer 5+.
    • _self . Replace the current document. Standard: Most browsers.
    • _top. Replaces any frameset loaded, otherwise just like _self . Standard: Most browsers.
  • strFeatures is a string of comma-delimited feature and value pairs. NOTE: There cannot be a space after each comma. The default size is the same as the parent window.
    • alwaysLowered={yes|no|1|0} . Standard: Gecko.
    • alwaysRaised={yes|no|1|0} . Standard: Gecko.
    • channelmode={yes|no|1|0} . Standard: Internet Explorer.
    • dependent={yes|no|1|0} . Standard: Gecko.
    • directories={yes|no|1|0} . Standard: Most browsers.
    • fullscreen={yes|no|1|0} . Standard: Internet Explorer.
    • height=intPixels . Minimum is 100 px. Standard: Most browsers.
    • hotkeys={yes|no|1|0} . Standard: Netscape.
    • innerHeight=intPixels . Standard: Netscape.
    • innerWidth=intPixels . Standard: Netscape.
    • location={yes|no|1|0} . Standard: Most browsers.
    • menubar={yes|no|1|0} . Standard: Most browsers.
    • outerHeight=intPixels . Standard: Netscape.
    • outerWidth=intPixels . Standard: Netscape.
    • resizable={yes|no|1|0} . Standard: Most browsers.
    • screenX=intPixels. Standard: Netscape. left=n . Standard: Internet Explorer.
    • screenY=intPixels. Standard: Netscape. top=n . Standard: Internet Explorer.
    • scrollbars={yes|no|1|0} . Standard: Most browsers.
    • status={yes|no|1|0} . Standard: Most browsers.
    • titlebar={yes|no|1|0} . Standard: Most browsers.
    • toolbar={yes|no|1|0} . Standard: Most browsers.
    • top=intPixels. Standard: Most browsers.
    • width=intPixels . Minimum is 100 px. Standard: Most browsers.
    • z-lock={yes|no|1|0} . Standard: Netscape.
  • blnReplace. When the strURL is loaded into the same window, this Boolean parameter specifies whether the strURL creates a new entry or replaces the current entry in the window's history list. Standard: Internet Explorer.

.print(). Prints the document associated with the window. Just like the user pressing the Print button. Especially useful if you've removed the toolbars from a window (EG:<a href="javascript:window.print()">Print</a>). Standard: Most browsers.

.prompt(strMessage, strDefaultResponse). Displays a dialog box that prompts the user with a message and an input field. Returns strDefaultResponse or the entered response as a string or integer. Standard: Most browsers.

.resizeBy(intXPixels,intYPixels). Changes the current size of the window by the specified x- and y-offset. Standard: Internet Explorer.

.resizeTo(intXPixels,intYPixels). Sets the size of the window to the specified "outer" width and height values. Standard: Internet Explorer.

.scroll(intXPixels,intYPixels). Causes the window to scroll to the specified x- and y-offset at the upper-left corner of the window. This method has been deprecated in favor of scrollTo(). Standard: Internet Explorer.

.scrollBy(intXPixels,intYPixels). Causes the window to scroll relative to the current scrolled position by the specified x- and y-pixel offset. Standard: Internet Explorer.

.scrollTo(intXPixels,intYPixels). Scrolls the window to the specified x- and y-offset. Standard: Internet Explorer.

.setActive(). Sets the object as active without setting focus to the object. Standard: Internet Explorer.

.setInterval(function,intMilliSeconds[,strLanguage]). Repeatedly calls a function every few milliseconds and passes along the arguments. Returns an identifier that cancels the timer with the clearInterval() method. Standard: Internet Explorer.

.setTimeout(expression, milliseconds[, language]). Evaluates expression after a few milliseconds. Returns an identifier that cancels the evaluation with the clearTimeout() method. Standard: Internet Explorer.

.showHelp(strURL[,vntContextID]). Displays a Help file. This method can be used with Microsoft HTML Help. Standard: Internet Explorer.

.showModalDialog(strURL [, vntArguments] [, strFeatures]). Creates a modal dialog box that displays the specified HTML document. Not only can features of the dialog box be set, but variables can be passed into it as well. Standard: Internet Explorer.

.showModelessDialog(strURL [, vntArguments] [, strFeatures]). Creates a modeless dialog box that displays the specified HTML document. Unlike .alert(), .cofirm(), and .prompt(), and .showModalDialog(), this method allows users to click on the original page. Standard: Internet Explorer.

.stop(). Stop button.

Objects

.clientInformation Contains information about the Web browser.

.clipboardData Provides access to predefined clipboard formats for use in editing operations.

.crypto Returns the browser crypto object. Standard: Gecko.

.directories Returns a reference to the directories toolbar in the current chrome. Standard: Gecko.

.document Returns a reference to the document that the window contains, usually <html>. Standard: Most.

.event Represents the state of an event, such as the element in which the event occurred, the state of the keyboard keys, the location of the mouse, and the state of the mouse buttons.

.external Allows access to an additional object model provided by host applications of the Microsoft® Internet Explorer browser components.

.history Contains information about the URLs visited by the client. Standard: Most browsers.

.location Contains information about the current URL. See also the property .location. Standard: Most browsers.

.locationbar Returns the locationbar object, whose visibility can be toggled in the window. Standard: Gecko.

.menubar Returns the menubar object, whose visibility can be toggled in the window. Standard: Gecko.

.navigator Returns a reference to the navigator object, i.e. the browser. Standard: Most browsers.

  • .navigator.appCodeName Returns the internal "code" name of the current browser. Standard: Gecko.
  • .navigator.appName Returns the official name of the browser. Standard: Gecko.
  • .navigator.appVersion Returns the version of the browser as a string. Standard: Gecko.
  • .navigator.cookieEnabled Returns a boolean indicating whether cookies are enabled in the browser or not. Standard: Gecko.
  • .navigator.language Returns a string representing the language version of the browser. Standard: Gecko.
  • .navigator.mimeTypes Returns a list of the MIME types supported by the browser. Standard: Gecko.
  • .navigator.oscpu Returns a string that represents the current operating system. Standard: Gecko.
  • .navigator.platform Returns a string representing the platform of the browser. Standard: Gecko.
  • .navigator.plugins Returns an array of the plugins installed in the browser. Standard: Gecko.
  • .navigator.product Returns the product name of the browser. EG: "Gecko". Standard: Gecko.
  • .navigator.productSub Returns the product version number. EG: "5.0". Standard: Gecko.
  • .navigator.userAgent Returns the user agent string for the current browser. Standard: Gecko.
  • .navigator.vendor Returns the vendor name of the current browser. EG: "Netscape6". Standard: Gecko.
  • .navigator.vendorSub Returns the vendor version number. EG: "6.1". Standard: Gecko.

.personalbar Returns the personalbar object, whose visibility can be toggled in the window. Standard: Gecko.

.pkcs11 Returns the pkcs11 object , which can be used to install drivers other software associated with the pkcs11 protocol. Standard: Gecko.

.screen Returns a reference to the screen object associated with the window.

  • .screen.availHeight. Specifies the y-coordinate of the first pixel that is not allocated to permanent or semi-permanent user interface features. Standard: Gecko.
  • .screen.availLeft. Returns the first available pixel available from the left side of the screen. Standard: Gecko.
  • .screen.availTop. Specifies the height of the screen, in pixels, minus permanent or semi-permanent user interface features displayed by the operating system, such as the Taskbar on Windows. Standard: Gecko.
  • .screen.availWidth. Returns the amount of horizontal space in pixels available to the window. Standard: Gecko.
  • .screen.colorDepth. Returns the color depth of the screen. Standard: Gecko.
  • .screen.height. Returns the height of the screen in pixels. Standard: Gecko.
  • .screen.left. Gets/sets the current distance in pixels from the left side of the screen. Standard: Gecko.
  • .screen.pixelDepth. Gets the bit depth of the screen. Standard: Gecko.
  • .screen.top. Gets/sets the distance from the top of the screen. Standard: Gecko.
  • .screen.width. Returns the width of the screen. Standard: Gecko.

.scrollbars. Returns the scrollbars object, whose visibility can be toggled in the window. Standard: Gecko.

.sidebar. Returns a reference to the window object of the sidebar. Standard: Gecko.

.statusbar. Returns the statusbar object, whose visibility can be toggled in the window. Standard: Gecko.

.toolbar. Returns the toolbar object, whose visibility can be toggled in the window. Standard: Gecko.



GeorgeHernandez.comSome rights reserved