IE 11 Cannot Submit HTML Form
I have this HTML form
<form name="nextform" action="anotherpage.php" method="post" enctype="multipart/form-data"> <input name="pinid" id="pinid" type="hidden"> <input type="submit" name="submit" id="post" value="Lets Go" class="formButtonMap"> </form> pinid dynamically gets the value using JavaScript. When it gets the value, I warn about it, and it works.
But when I click the Lets Go button, nothing happens. I see Internet Explorer loading in a few minutes, and then I get the message "The webpage is not responding." If I delete the update, it goes to anotherpage.php , but the values ββfrom the form do not go to the server.
Rarely displays this message:
Visual Studio Just-In-Time Debugger Debugging
An unhandled win32 exception occurred in iexplorer.exe [688]
Possible debuggers:
New instance of Microsoft Visual Studio 2012
This behavior is observed only in Internet Explorer 11.0.2. The form works in older versions of Internet Explorer, as well as in Chrome and Firefox. I do not see errors in the IE console.
Here is the JavaScript code located above the form:
// called when another button is clicked - basicaly is websockets function save() { var so = new WebSocket("ws://localhost:8000"); so.onerror = function (evt) { alert('problem'); } if (sara == 'LINES') { so.onopen = function() { so.send(JSON.stringify({ command: 'insertAll', name: document.getElementById('name').value })); } } if (sara == 'POLY') { so.onopen = function() { so.send(JSON.stringify({ command: 'insertHalf', name: document.getElementById('name').value })); } } so.onmessage = function (evt) { var received_msg = evt.data; document.getElementById("next").style.display = "block"; document.getElementById("name").value = ""; document.getElementById("descr").value = ""; clearLinks(); document.getElementById("pinid").value = received_msg; alert(document.getElementById("pinid").value); // works so.close(); } } I tried to edit the code using document.getElementById("nextform").submit(); , the problem still exists.
It's me? This is mistake? What am I missing?
hi may be a problem in your code that you skip to add an identifier to the form, and you are trying to access the form by that identifier that you do not define.
document.getElementById("nextform").submit(); required
<form name="nextform" id="nextform" action="anotherpage.php" method="post" enctype="multipart/form-data"> ... ... ... </form> Track what happens on the anotherpage.php page when it receives the postback, evt.data cannot be encoded as you expect (it is binary text or text, if it is text, this is utf-8).
Sending to another page, where everything that it does, displays the values ββdisplayed back.
Does the socket close the exception closure?
so.close(); My source code has a form with more than 5 fields. When sending calls save() . The save() function also clears fields using JS.
IE11 has a bug that causes the browser to crash if you try to clear more than 5 fields using JS. See here , there is a workaround.
This error breaks the first form, then the nextform form, as well as the browser. I FILL in that I did not send all my code, I did not know that this is due to the first form.
Since I thought the same part of the code had two different problems, I posted another question, very similar, here