$(document).on('click', '#ajax_form_submit', function(){ $('#ajaxForm').ajaxSubmit({ beforeSubmit: function(a,f,o) { o.dataType = 'script'; } }); });