mmm devo dire che quello script non è proprio il più customizzabile del mondo...
se le cose restano costanti devi fare:
codice:
var MyObj = {};
function myOnSubmit(){
MyObj = {};
$('#asmList0 span.asmListItemLabel').each(function(item){
var str = item.text();
MyObj[str] = [];
});
$('#asmList1 span.asmListItemLabel').each(function(item){
var str = item.text();
for(var x in MyObj){
MyObj[x].push(str);
}
});
$.ajax({
'url' : 'file.php',
'type' : 'post',
'success' : CallbackFunction,
'data' : MyObj
});
return false;
}
function CallbackFunction(data){
alert("Dati inviati al server\n Risposta: "+data);
}
$(document).ready(function(){
$("#IDForm").bind('submit', myOnSubmit); //Ovviamente devi mettere l'id alla form
});
Dovrebbe andare, spero (io non lo uso jQuery)...