How to make the form transfer, in addition to the values of all the fields of the form, also the attached file?
Now did this:
$('#content').on('submit', '#add_event_form', function(e){ e.preventDefault(); var m_method=$(this).attr('method'); var m_action=$(this).attr('action'); var m_data=$(this).serialize(); $.ajax({ type: m_method, url: m_action, data: m_data, success: function(result){ $('.event_form_action').hide('slow'); $('.add_event_text').height(48); $('#content .dashboard-list').html(result); $("#add_event_form").trigger('reset'); } }); });