Guest User

Untitled

a guest
Jun 21st, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. var query_string = '';
  2.  
  3. $("someElement").each( function() {
  4. if (this.checked) {
  5. query_string += "&test[]=" + this.value;
  6. }
  7. });
  8.  
  9. $.ajax({
  10. type: 'POST',
  11. url: 'test.php',
  12. data: 'id=1' + query_string,
  13. success: function(t) {
  14. $('div#content').empty().append(t);
  15. },
  16. error: function() {
  17. $('div#content').append('An error occured during processing');
  18. }
  19. });
Add Comment
Please, Sign In to add comment