JQuery asynchronous file Upload plug-in ajaxFileUpload details _ jquery

Source: Internet
Author: User
This article mainly introduces the jQuery asynchronous file Upload plug-in ajaxFileUpload in detail. This article first describes the ajaxFileUpload parameters, error prompts, and other knowledge, and then provides simple examples and ASP. use instances in NETMVC mode. For more information, see 1. ajaxFileUpload is a jQuery plug-in for asynchronous file upload.

Upload a version that you don't know, so you don't need to find it in the future.

Syntax: $. ajaxFileUpload ([options])

Options parameter description:

1. url Upload handler address.
2. the ID of the file field to be uploaded by fileElementId, that is.
3. whether secureuri enables secure submission. the default value is false.
4. data type returned by the dataType server. It can be xml, script, json, or html. If this parameter is left blank, jQuery will automatically judge it.
5. the processing function automatically executed after successful submission of success. the parameter data is the data returned by the server.
6. the processing function automatically executed when the error is submitted.
7. Custom data parameters. This is useful when data is related to uploaded images.
8. if you want to submit a custom parameter, set this parameter to post.

Error message:

1. SyntaxError: missing; before statement error
If this error occurs, check whether the url path can be accessed.
2. SyntaxError: syntax error
If this error occurs, check whether the server background processing program that handles the submitted operation has a syntax error.
3, SyntaxError: invalid property id error
If this error occurs, check whether the text domain property ID exists.
4, SyntaxError: missing} in XML expression error
If this error occurs, check whether the file name is consistent or does not exist.
5. other custom errors
You can directly print the variable $ error to check whether the parameters are correct, which is much more convenient than the above error prompts.

Usage:

Step 1: introduce jQuery and ajaxFileUpload plug-ins first. Pay attention to the order. Needless to say, this applies to all plug-ins.

The code is as follows:


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.