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 } );
I’m not actually submitting a form though. All I am doing is sending the ID to ajax to do the form like manipulation. One of the reasons I am doing this is so that I can have my buttons styled consistent across my site. Style links and buttons the same leads to a lot of styling conflicts which is why I’m making everything links and not using forms.