odoo submit form using js and display data

JavaScript
success: function(data){    console.log(typeof data);    console.log('Success! ' + data);    var doc = new DOMParser().parseFromString(data, "text/html");    var tmp_element = doc.getElementById('form');    console.log('Element ' + tmp_element);    if (tmp_element == null){        document.getElementById('form_error').innerHTML = "The page needs to be reloaded!";    }else{        form.submit();    }    },var image_input = null;var file = document.getElementById('photo').files[0];if (file) {     var reader = new FileReader();     reader.readAsDataURL(file);     reader.onload = function(e)          {             image_input = e.target.result;         }var result = {'article': image_input}$.ajax({        url: "/page/admission_details",        method: "POST",        dataType: "json",        data: result,
Source

Also in JavaScript: