Command summary in the pop-up window

Source: Internet
Author: User
Window. open window. Alert window. comfirm window. Prompt window. showmodaldialog window. showmodelessdialog

1 window. Open (pageurl, name, parameters)
Pageurl is the pop-up window path
Name is the name of the pop-up window. It can also be the name of the window that comes with the system, such as _ Self, _ blank, _ top, _ parent...
Parameters is window parameters (parameters are separated by commas)
Parameters
Here, yes/no can also use 1/0; pixel value is a specific value, in pixels.
Parameter | value range | description
Alwayslowered | yes/no | specifies that the window is hidden behind all windows
Alwaysraised | yes/no | specify that the window is suspended above all windows
Depended | yes/no | whether to close the parent window at the same time
Directories | yes/no | whether the directory bar of nav2 and 3 is visible
Height | pixel value | window height
Hotkeys | yes/no | set the Security Exit hotkey in the window without menu bar
Innerheight | pixel value | pixel height of the document in the window
Innerwidth | pixel value | pixel width of the document in the window
Location | yes/no | whether the location bar is visible
Menubar | yes/no | whether the menu bar is visible
Outerheight | pixel value | set the pixel height of the window (including the decorative border)
Outerwidth | pixel value | set the pixel width of the window (including the decorative border)
Resizable | yes/no | whether the window size can be adjusted
Screenx | pixel value | pixel length between the window and the left boundary of the screen
Screeny | pixel value | pixel length between the window and the upper boundary of the screen
Scrollbars | yes/no | whether the window has a scroll bar
Titlebar | yes/no | whether the title bar of the window is visible
Toolbar | yes/no | whether the toolbar of the window is visible
Width | pixel value | pixel width of the window
Z-Look | yes/no | whether the window floated above other windows after being activated
Common examples:
Window. Open ('page.html ', 'newwindow', 'fullscreen') // full screen
Window. Open ('page.html ',' _ Self ', 'fullscreen = Yes, Height = 100, width = 400, Top = 0, Left = 0,
Toolbar = No, menubar = No, scrollbars = No, resizable = No, location = No, status = no') // a full screen window is displayed on the current page, detailed settings are available.
Popwin = Window. Open ('test. jsp '); // obtain the pop-up window object for operation
Popwin. Focus (); // focus window

2 window. Alert () parameter. There is only one parameter, and the information in the warning box is displayed. No return value is returned.
3 window. Confirm () has only one parameter. The prompt box is displayed. Press OK to return true; Press Cancel to return false.

4 window. Prompt () parameters. There are two parameters. The first parameter indicates the information in the prompt box. The second parameter is used to display the default value of the input box. Returned value: the value entered by the user.

5. The window. showmodaldialog () method is used to create a modal dialog box that displays HTML content. The window. showmodelessdialog () method is used to create a non-modal dialog box that displays HTML content.
Showmodaldialog () differs from showmodelessdialog () in that the window opened by showmodaldialog () is placed on the parent window and must be closed to access the parent window; showmodelessdialog (), you can access the window opened in the parent window without closing the window.
Usage:
Vreturnvalue = Window. showmodaldialog (Surl [, varguments] [, sfeatures])
Vreturnvalue = Window. showmodelessdialog (Surl [, varguments] [, sfeatures])
Parameter description:
Surl --
Required parameter. Type: string. Specifies the URL of the document to be displayed in the dialog box.
Varguments --
Optional parameter; Type: variant. Used to pass parameters to the dialog box. The passed parameter types are not limited, including arrays. The dialog box uses window. dialogarguments to obtain the passed parameters.
Sfeatures --
Optional parameter; Type: String. Used to describe the appearance and other information of the dialog box. You can use one or more of the following, separated by semicolons.
1. dialogheight: the dialog box height. The default unit of dialogheight and dialogwidth in ie4 is em, while that in ie5 is PX. For convenience, when defining the modal mode dialog box, unit with PX.
2. dialogwidth: Dialog Box width.
3. dialogleft: the distance from the left of the screen.
4. dialogtop: the distance from the screen.
5. Center: {Yes | no | 1 | 0}: whether the window is centered. The default value is yes, but the height and width can still be specified.
6. Help: {Yes | no | 1 | 0}: whether to display the Help button. The default value is yes.
7. resizable: {Yes | no | 1 | 0} [ie5 +]: whether the size can be changed. No by default.
8. Status: {Yes | no | 1 | 0} [ie5 +]: whether to display the status bar. The default value is Yes [modeless] or no [modal].
9. Scroll: {Yes | no | 1 | 0 | on | off}: Specifies whether the scroll bar is displayed in the dialog box. The default value is yes.

Parameter transfer:
Varguments is used to pass Parameters in the dialog box. The type is not limited. For string types, the maximum value is 4096 characters. Objects can also be passed, for example:
-------------------------------
Parent.htm

I personally think that showmodaldialog and showmodelessdialog are of great use. In particular, return values are obtained from the pop-up page. For example, the pop-up page is a multi-choice checkbox or a single-choice radio that returns a row of data.
Select the two based on your needs.
Article Source: DIY tribe (http://www.diybl.com/course/4_webprogram/php/phpjs/20090308/159939.html)

This article from the csdn blog, reproduced please indicate the source: http://blog.csdn.net/jzzcn/archive/2009/12/16/5018551.aspx

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.