Submit form after successful AJAX file upload?

Hi guys,

I have codes below,


	$(document).ready(function() {
		$('#imageform').ajaxForm( {
		    dataType : 'json',
		    beforeSubmit: function() {
		        $(this).addClass('loading');
		        $('#uploadBox').html('<div id="progressOverlay"><div class="progress progress-striped"><div class="bar" id="progressBar" style="width: 0%;">0%</div></div></div>');
		    },
		    uploadProgress: function ( event, position, total, percentComplete ) {
		        if (percentComplete == 100) {
		            $('#progressBar').css('width',percentComplete+'%').html('Okay!');
		        } else {
		            $('#progressBar').css('width',percentComplete+'%').html(percentComplete+'%');
		        }
		    },
		    success : function ( json ) {
		        //Your Custom JS Code Here
		    }
		});
	});

These codes is for AJAX file upload.
What I wanted is after successful AJAX file upload, I wanted it to submit the form.
What jQuery codes should I put on success:?

Thank you very much in advanced.

Hi solidcodes,

You’re using the jQuery Form plugin, right? If so, it looks like your form should be submitted by AJAX by the plugin, so what you put in the success callback depends on what you want to happen after the form has been submitted.