I'm trying to post some data built from some non-form elements but I can't seem to crack it.
How can I create an array in the same format as serializeArray()
does with form fields?
I've tried several variations on this but it only picks up the last .active
tag.
$('li.tag.active').each(function() {
values = {};
values['tagID'] = $(this).attr('id');
});
$.post("/scripts/php/process.php",{
'data': data,
funcName : 'tagResults'
},function(results){
$("#results").html(results);
})
ok - found this in the end which works exactly as if it was input fields with serializeArray()...