Every now and then, when a user opens the page, it starts flickering and resizing itself. After checking the log, it appears that the submit function is being called multiple times, but I can't reproduce this issue in my own environment.
Is there something in the code below that seems suspicious to you? Or any specific things I should look into to identify the root cause of the problem?
Update: It looks like the .net page keeps refreshing itself and triggering the submit() function during the onload event, but the request never reaches the server. This strange bug occurs on one machine but not on another identical one. Could it be related to a load balancer issue?
Update: We were finally able to replicate this bug by going through a load balancer, but the exact cause remains unknown. Additionally, this issue only pops up sporadically, and sometimes closing and reopening IE might resolve it.
window.onload = function () {
if (document.getElementById("hfPostBack").value != "true") {
if (confirm('hfPostBack value is: ' + document.getElementById("hfPostBack").value +
'. Continue with the action?')) {
document.getElementById("hfPostBack").value = "true";
document.forms[0].submit();
}
} else {
alert('hfPostBack value is: ' + document.getElementById("hfPostBack").value);
}
}