Form submission doesn't work after reloading the state


Hi all,

html file:

    <form id="uploadForm" method="post">
    <input type = "file">
    <input type="submit" value="OK">

$("#uploadForm").submit(function (e) {
var formData = new FormData();
formData.append(‘file’, $(‘input[type=file]’)[0].files[0])
//some code for uploading a file

The problem is that when I upload file first time it works well, after reloading a state submit button doesn’t react. What could be a reason for that?