this is what i found on jquery.documentation, "Serialize requires that fields have a name attribute. Having only an id will not work."
On Feb 23, 8:10 am, Andri <4r53...@gmail.com> wrote: > I have a form, and i want to combing jquery validation ajax Submit and > jquploader. > > This is the script > > $("#RegForm").validate({ > submitHandler: function(form) { > jQuery(form).ajaxSubmit({ > var str = $("#RegForm").serialize(); > > $.ajax({ > type: 'POST', > url: 'ajax.php', > data: str, > success: > function(msg) { > if(msg == > 'OK') { > > $('#status').html('<b>Data Has Been Added to Database</b>'); > } else { > > $('#status').html(msg); > } > } > }) > $('form :input').val(""); > $('form > :input[type=submit]').val("Submit"); > > return false; > }); > } > }); > > But it got an error on => var str = $("#RegForm").serialize();\n > (missing : after property id) > > How to solve this ?