Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var query_string = '';
- $("someElement").each( function() {
- if (this.checked) {
- query_string += "&test[]=" + this.value;
- }
- });
- $.ajax({
- type: 'POST',
- url: 'test.php',
- data: 'id=1' + query_string,
- success: function(t) {
- $('div#content').empty().append(t);
- },
- error: function() {
- $('div#content').append('An error occured during processing');
- }
- });
Add Comment
Please, Sign In to add comment