You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+20-20Lines changed: 20 additions & 20 deletions
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
# jQuery Form [](https://travis-ci.org/jquery-form/form)
2
2
3
3
## Overview
4
-
The jQuery Form Plugin allows you to easily and unobtrusively upgrade HTML forms to use AJAX. The main methods, ajaxForm and ajaxSubmit, gather information from the form element to determine how to manage the submit process. Both of these methods support numerous options which allows you to have full control over how the data is submitted.
4
+
The jQuery Form Plugin allows you to easily and unobtrusively upgrade HTML forms to use AJAX. The main methods, ajaxForm and ajaxSubmit, gather information from the form element to determine how to manage the submit process. Both of these methods support numerous options which allow you to have full control over how the data is submitted.
5
5
6
6
No special markup is needed, just a normal form. Submitting a form with AJAX doesn't get any easier than this!
7
7
@@ -13,7 +13,7 @@ Please note that this project is released with a [Contributor Code of Conduct](C
13
13
14
14
### Pull Requests Needed
15
15
#### Enhancements needed to to be fully compatible with jQuery 3
16
-
jQuery 3 is removing a lot of features that have been depreciated for a long time. Some of these are still in use by jQuery Form.
16
+
jQuery 3 is removing a lot of features that have been deprecated for a long time. Some of these are still in use by jQuery Form.
17
17
Pull requests and assistance in updating jQuery Form to be compatible with jQuery 3 are greatly appreciated.
18
18
See [issue #544](https://github.com/jquery-form/form/issues/544) for more information.
19
19
@@ -62,7 +62,7 @@ Use ajaxForm when you want the plugin to manage all the event binding for you.
62
62
````javascript
63
63
// prepare all forms for ajax submission
64
64
$('form').ajaxForm({
65
-
target:'#myResultsDiv'
65
+
target:'#myResultsDiv'
66
66
});
67
67
````
68
68
@@ -73,10 +73,10 @@ Use ajaxSubmit if you want to bind your own submit handler to the form.
**Note:** All standard [$.ajax](http://api.jquery.com/jQuery.ajax) options can be used.
87
87
88
88
### beforeSerialize
89
-
Callback function invoked prior to form serialization. Provides an opportunity to manipulate the form before its values are retrieved. Returning `false` from the callback will prevent the form from being submitted. The callback is invoked with two arguments: the jQuery wrapped form object and the options object.
89
+
Callback function invoked before form serialization. Provides an opportunity to manipulate the form before its values are retrieved. Returning `false` from the callback will prevent the form from being submitted. The callback is invoked with two arguments: the jQuery wrapped form object and the options object.
Callback function invoked prior to form submission. Returning `false` from the callback will prevent the form from being submitted. The callback is invoked with three arguments: the form data in array format, the jQuery wrapped form object, and the options object.
98
+
Callback function invoked before form submission. Returning `false` from the callback will prevent the form from being submitted. The callback is invoked with three arguments: the form data in array format, the jQuery wrapped form object, and the options object.
99
99
100
100
````javascript
101
101
beforeSubmit:function(arr, $form, options) {
@@ -110,9 +110,9 @@ Callback function invoked before processing fields. This provides a way to filte
Expected data type of the response. One of: null, 'xml', 'script', or 'json'. The dataType option provides a means for specifying how the server response should be handled. This maps directly to jQuery's dataType method. The following values are supported:
131
131
132
132
* 'xml': server response is treated as XML and the 'success' callback method, if specified, will be passed the responseXML value
133
-
* 'json': server response will be evaluted and passed to the 'success' callback, if specified
133
+
* 'json': server response will be evaluated and passed to the 'success' callback, if specified
134
134
* 'script': server response is evaluated in the global context
135
135
136
136
### delegation
@@ -149,8 +149,8 @@ $('form').ajaxForm({
149
149
Callback function to be invoked upon error.
150
150
151
151
### forceSync
152
-
Only applicable when explicity using the iframe option or when uploading files on browses that don't support XHR2.
153
-
Set to `true` to remove the short delay before posting form when uploading files. The delay is used to allow the browser to render DOM updates prior to performing a native form submit. This improves usability when displaying notifications to the user, such as "Please Wait..."
152
+
Only applicable when explicity using the iframe option or when uploading files on browsers that don't support XHR2.
153
+
Set to `true` to remove the short delay before posting form when uploading files. The delay is used to allow the browser to render DOM updates before performing a native form submit. This improves usability when displaying notifications to the user, such as "Please Wait..."
154
154
155
155
### iframe
156
156
Boolean flag indicating whether the form should *always* target the server response to an iframe instead of leveraging XHR when possible.
@@ -159,19 +159,19 @@ Boolean flag indicating whether the form should *always* target the server respo
159
159
String value that should be used for the iframe's src attribute when an iframe is used.
160
160
161
161
### iframeTarget
162
-
Identifies the iframe element to be used as the response target for file uploads. By default, the plugin will create a temporary iframe element to capture the response when uploading files. This options allows you to use an existing iframe if you wish. When using this option the plugin will make no attempt at handling the response from the server.
162
+
Identifies the iframe element to be used as the response target for file uploads. By default, the plugin will create a temporary iframe element to capture the response when uploading files. This option allows you to use an existing iframe if you wish. When using this option the plugin will not attempt handling the response from the server.
163
163
164
164
### method
165
165
The HTTP method to use for the request (e.g. 'POST', 'GET', 'PUT').
166
166
167
167
### replaceTarget
168
-
Optionally used along with the the target option. Set to true if the target should be replaced or false if only the target contents should be replaced.
168
+
Optionally used along with the target option. Set to true if the target should be replaced or false if only the target contents should be replaced.
169
169
170
170
### resetForm
171
171
Boolean flag indicating whether the form should be reset if the submit is successful
172
172
173
173
### semantic
174
-
Boolean flag indicating whether data must be submitted in strict semantic order (slower). Note that the normal form serialization is done in semantic order with the exception of input elements of `type="image"`. You should only set the semantic option to true if your server has strict semantic requirements and your form contains an input element of `type="image"`.
174
+
Boolean flag indicating whether data must be submitted in strict semantic order (slower). Note that the normal form serialization is done in semantic order except for input elements of `type="image"`. You should only set the semantic option to true if your server has strict semantic requirements and your form contains an input element of `type="image"`.
175
175
176
176
### success
177
177
**Deprecated**
@@ -232,7 +232,7 @@ Clears selected field elements. This is handy when you need to clear only a part
232
232
---
233
233
234
234
## File Uploads
235
-
The Form Plugin supports use of [XMLHttpRequest Level 2]("http://www.w3.org/TR/XMLHttpRequest/") and [FormData](https://developer.mozilla.org/en/XMLHttpRequest/FormData) objects on browsers that support these features. As of today (March 2012) that includes Chrome, Safari, and Firefox. On these browsers (and future Opera and IE10) files uploads will occur seamlessly through the XHR object and progress updates are available as the upload proceeds. For older browsers, a fallback technology is used which involves iframes. [More Info](http://malsup.com/jquery/form/#file-upload)
235
+
The Form Plugin supports the use of [XMLHttpRequest Level 2]("http://www.w3.org/TR/XMLHttpRequest/") and [FormData](https://developer.mozilla.org/en/XMLHttpRequest/FormData) objects on browsers that support these features. As of today (March 2012) that includes Chrome, Safari, and Firefox. On these browsers (and future Opera and IE10) files uploads will occur seamlessly through the XHR object and progress updates are available as the upload proceeds. For older browsers, a fallback technology is used which involves iframes. [More Info](http://malsup.com/jquery/form/#file-upload)
236
236
237
237
---
238
238
@@ -242,7 +242,7 @@ See [CONTRIBUTORS](CONTRIBUTORS.md) for details.
242
242
243
243
## License
244
244
245
-
This project is duallicensed under the LGPLv2.1 (or later) or MIT licenses:
245
+
This project is dual-licensed under the LGPLv2.1 (or later) or MIT licenses:
246
246
247
247
*[GNU Lesser General Public License v2.1](LICENSE)
0 commit comments