Skip to content

Capture POST parameter with jQuery. This project will help you if you are trying to get any POST parameter. (This project is referenced from http://stackoverflow.com/a/1409029/3352865)

License

Notifications You must be signed in to change notification settings

ssut/jQuery-PostCapture

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

57 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jQuery-PostCapture Build Status Build status

Capture POST parameter with jQuery. This project will help you if you are trying to get any POST parameter. (This project is referenced from http://stackoverflow.com/a/1409029/3352865 -- profit!)


Features

  • Get any post parameter formatted javascript object
  • use html5 localStorage when available (else cookie)

Warning

This plugin is saves form data as human-readable text format(json) and save to cookie storage when (1) localStorage is unavailable (2) target domain and port(action) is different(Read this). This operation is very dangerous if web page is not secured and use this for important form data. please use SSL.

This plugin is not working when target domain is different because this plugin uses localStorage & cookie.

Installation

bower

Via bower.

$ bower install jquery-postcapture

Or add jquery-postcapture to your apps bower.json.

"dependencies": {
  "jquery-postcapture": "latest"
}

standalone

First, download a distribution from Releases.

Include script after the jQuery library (unless you are packaging scripts somehow else): <script src="/path/to/jquery.postcapture.js"></script>

Do not hotlink the raw script url. (https://raw.github.com/...). The file is being served as text/plain and as such being blocked in Internet Explorer on Windows 7 for instance (because of the wrong MIME type).

Bottom line: GitHub is not a CDN.

Dependencies

Requires jQuery 1.6.x or higher. (support all jQuery versions)

Usage

$('#form').capture();

Read specific input value: $.captures('name'); // -> value

Read specific(filter) input values: $.captures(['name1', 'name2', 'name3']); // -> { 'name1': 'value', ... }

Read all available input values: $.captures(); // -> { 'name': 'value', ... }

Contributing

$ git clone https://github.com/ssut/jQuery-PostCapture.git
$ cd jQuery-PostCapture/
$ npm install
$ npm install grunt-cli -g

To run the grunt-watch suite locally:

$ grunt watch

To run the test suite locally:

$ npm test

Changes

Version Notes
0.0.1 First release

Author

SuHun Han (@ssut)

License

This plugin is available under the BSD 3-Clause license.

About

Capture POST parameter with jQuery. This project will help you if you are trying to get any POST parameter. (This project is referenced from http://stackoverflow.com/a/1409029/3352865)

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •