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 } ); Quote 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 Quote 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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.