Jump to content

Send Array Object to jQuery Get


unemployment

Recommended Posts

I'm trying to send my array object through ajax using the jQuery .get method, but when it sends, ids show up as multiple parameters and I'm not sure if that's the way to do it.

 

Here is my code:

 

var val = [];
$(':checkbox:checked').each(function(i){
     val[i] = $(this).attr('id').substring(6);
});

$.get("/assets/ajax/pm_change_status.php", { s: sess_id(), 'ids[]': val } );

Link to comment
https://forums.phpfreaks.com/topic/253808-send-array-object-to-jquery-get/
Share on other sites

  • 2 weeks later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.