unemployment Posted December 24, 2011 Share Posted December 24, 2011 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 More sharing options...
gristoi Posted January 3, 2012 Share Posted January 3, 2012 try json encoding the val array before you send it Link to comment https://forums.phpfreaks.com/topic/253808-send-array-object-to-jquery-get/#findComment-1303664 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.