[eluser]cahva[/eluser]
@RobertB:
Serialize function did'nt work because you tried to use serialize on a form element. Serialize function should be used with the whole form. So if you had form like this:
Code:
<form id="testform">
1 <input type="checkbox" name="id[]" value="1">
2 <input type="checkbox" name="id[]" value="2">
3 <input type="checkbox" name="id[]" value="3">
4 <input type="checkbox" name="id[]" value="4">
<input type="submit" id="fsubmit" value="submit">
</form>
Then at js side:
Code:
$("#testform").submit(function(ev) {
ev.preventDefault();
var data=$(this).serialize();
console.log(data);
});
BTW, the usage of $('#fb-submit').live() is wrong, .live() does not need the "json" at the end. Its only used in $.get,$.post and ajax functions to tell the datatype. Also using delegate() instead of live() is preferable (google for example delegate vs live and check the jquery manual about delegate function).
@stormbytes:
A little code would help