Example of how to use jqueryshowModelDialog _ jquery

Source: Internet
Author: User
This article mainly introduces window. for how to use showModalDialog, You need to receive a task two days before using it: when a user uploads an attachment, You need to verify the ID card information in the attachment uploaded by the user, if an error message exists, all the error messages must be displayed.
At the beginning, I considered using jQuery Dialog. However, we can see that showModelDialog is not used for this project, so showModelDialog is also required for unification.

The window. showModalDialog () method is used to create a modal dialog box that displays HTML content. Because it is a dialog box, it does not have all the properties of the window opened by window. open.
Usage:
VarreturnValue = window. showModalDialog (URL [, arguments] [, features])
Parameter description:
URL: Required parameter: Specifies the URL of the document to be displayed in the dialog box.
Arguments: Optional. 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.
Features is an optional parameter. Used to describe the appearance and other information of the dialog box. You can use one or more of the following, separated by semicolons.
The height of the dialogHeight dialog box, which is not smaller than PX.
DialogWidth: Dialog Box width.
DialogLeft: The left distance from the desktop.
DialogTop: the distance from the desktop.
Center: {yes | no | 1 | 0}: whether the window is centered. The default value is yes, but the height and width can still be specified. Help: {yes | no | 1 | 0}: whether to display the help button. The default value is yes. Resizable: {yes | no | 1 | 0} [ie5 +]: whether the size can be changed. No by default. Status: {yes | no | 1 | 0} [IE5 +]: whether to display the status bar. The default value is yes [Modeless] or no [Modal]. Scroll: {yes | no | 1 | 0 | on | off}: Specifies whether the scroll bar is displayed in the dialog box. The default value is yes.
Example:

The Code is as follows:


Var rv = window. showModalDialog ("<% = path %>/query/query_showErrorInfo.action", "", "dialogWidth = 600px; dialogHeight =" + height + "px; dialogLeft = 400px; dialogTop = 200px; center = no; resizable = no ");

Height: controls the display quantity.
Url: it is an action. The action user obtains information about all error personnel. Go to the errorInfo. jsp page at the same time

ErrorInfo. jsp

The Code is as follows:


<% @ Page language = "java" import = "java. util. *" pageEncoding = "UTF-8" %>
<% @ Taglib uri = "/struts-tags" prefix = "s" %>



Batch query of persons with incorrect identities

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.