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 ?

Reply via email to