so lets say I wanted to essentially do this:
$.post(
'search_item.php',
{
serialzed_data,
save: form.save.value,
is_correct: form.is_correct.value ,
etc...
}
)
What is the correct syntax to do so?
many thanks,
EDIT to specify:
lets say I have this:
$.post(
'search_item.php',
{
'checks':post_data,
'option[]':option,
save: form.save.value,
item: form.item.value,
name: form.i_name.value,
desc: form.i_desc.value,
text: form.i_text.value
},
function(output) {
$('#return2').html(output).show();
});
now with that current .post I want to add this to it and post them together:
var serialized_data = $('input[name^="checks"]:checked').serialize();
can I do it?
EDIT latest attempt:
var post_data = $('input[name^="checks"]:checked').serialize();
var data = $.extend({}, post_data, {
'option[]':option, save: form.save.value,
item: form.item.value,
name: form.i_name.value,
desc: form.i_desc.value,
text: form.i_text.value
});
$.post('search_item.php', data ,
function(output) {
$('#return2').html(output).show();
});