I have a HTML form, that POSTs data to an application. The submit action has stopped POSTing anything to the application because as per the browser console. "Form is not connected".
I read an answer about this potential problem here. And I tried to attach the form to the body as mentioned in the accepted answer. But even then the POST request doesn't go through because the form is disconnected.
To provide an idea of what is exactly happening I am providing a snippet of my code:
<body>
<form action="BiApi/a/b" method="post" id="formquery" name= "makeQuery">
<!--Some text boxes and a submit button-->
</form>
<script>
var form=document.getElementById('formquery');
document.body.appendChild(form);
form.addEventListener('submit', function (event) {
document.write("<h1>Running Request, please wait...</h1><a href='https://www.mywebsite.com/a/b.html' >Go Back</a>");
this.style['display'] = 'none';
});
</script>
</body>
In the code I am appending the form to the body but no data is posted even after submit button is clicked.
Any solution?
Thank You.