简体   繁体   English

HTML表单提交导致IE11中的空白页

[英]HTML form submission lead to blank page in IE11

I have a web application created on dot net 4.0 framework where UI is done with html pages.But recently we are facing issue on form submission on IE 11 browser.The moment we submit form it turn out to be blank page.For other browsers(Chrome,firefox),even lowers version of IE its working fine. 我有一个在dot net 4.0框架上创建的Web应用程序,其中UI是用html页面完成的,但是最近我们在IE 11浏览器上提交表单时遇到了问题。提交表单的那一刻变成空白页面。对于其他浏览器( Chrome,firefox),甚至可以降低IE的版本,使其工作正常。

The interesting part of this issue is when I run the application on debug mode (by clicking f12) it just works fine. 这个问题的有趣部分是,当我在调试模式下运行应用程序时(单击f12),它运行正常。

Does anyone have idea why this is happening? 有谁知道为什么会这样?

<html>
<head>

<title>xyz</title>


<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
<script type="text/javascript" language="javascript">
<!--
window.name = "__xyz_APP_WINDOW____";
// -->
</script>
<script language='JavaScript' src='scripts/adminmenu.js'></script>
<script language='JavaScript' src='scripts/utilities.js'></script>
<script language='JavaScript' src='scripts/toolTips.js'></script>
<link rel="stylesheet" href="styles/backoffice.css" type="text/css">
<link rel="stylesheet" href="styles/screen.css" type="text/css" media="screen">
<link rel="stylesheet" href="styles/print.css" type="text/css" media="print">
<script language="javascript" type="text/javascript" src="scripts/jquery-min.js"></script>

<script language="JavaScript">
<!--

function checkFormData()
{
  do
  {
    var el = getForm().elements["uid"];
    if (!trimAll(el.value).length) break;
    el = getForm().elements["pwd"];
    if (!trimAll(el.value).length) break;
    getForm().elements["_tz_offset"].value = (new Date()).getTimezoneOffset().toString();
    return true;
  } while(0);
  alert(errorMessage[el.name]);
  el.focus();
  return false;
}

var errorMessage = new Array();

errorMessage["uid"] = "Please enter a Login ID";
errorMessage["pwd"] = "Please enter a password";

function handleEnter(anElement)
{
  if (13 == self.event.keyCode)
  {
    if ("uid" == anElement.name)
    {
      anElement.form.elements["pwd"].focus();
    }
    else if ("pwd" == anElement.name)
    {
      if (checkFormData()) anElement.form.submit();
    }
    self.event.returnValue = false;
  }
}


//-->
</script>

</head>
<body bgcolor="#FFFFFF" background="images/bkgd_BackOffice.gif" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" class="DetailBody" onLoad="getForm().elements['uid'].focus();">
<form name='adminForm' method='POST' onsubmit="return checkFormData()" >

  <input type="hidden" name="CurrentPage" value="admin_login"/>
  <input type="hidden" name="TargetPage" value="admin_index"/>
  <input type="hidden" name="_tz_offset" />
  <table width="800" border="0" cellspacing="0" cellpadding="0">
    <tr>
      <td bgcolor="#000000"><img src="images/spacer.gif" width="3" height="1"></td>
    </tr>
    <tr>
      <td><img src="images/masthead_BackOffice_OSP03.jpg" width="800" height="100"></td>
    </tr>
  </table>
  <table width="800" border="0" cellspacing="0" cellpadding="0">
    <tr valign="top"> 
      <td align="center"> 
        <table width="60%" border="0" cellpadding="10" cellspacing="0">
          <tr> 
            <td> 
              <p class="h1">Back Office Login</p>
              <p>The Back Office is reserved </p>
                 <script type ="text/javascript" language="JavaScript">
<!--
                     var correctBrowser = ((BrowserDetect.browser == "Safari" || BrowserDetect.browser == "Chrome") && BrowserDetect.OS == "Mac") ||
                      ((BrowserDetect.browser == "Explorer" || BrowserDetect.browser == "Chrome") && BrowserDetect.OS == "Windows");
                     //var correctBrowser = (BrowserDetect.browser == "Safari" && BrowserDetect.OS == "Mac") || (BrowserDetect.browser == "Explorer" && BrowserDetect.OS == "Windows");
                     var IsIE10OrIE11 =(BrowserDetect.browser == "Explorer" && BrowserDetect.OS == "Windows" && (BrowserDetect.version=="10" || BrowserDetect.version=="11" ));
                     if (!correctBrowser) {

                         document.write('<p><b><font color="#CC3333">PLEASE NOTE:</font></b> you are currently using <b>' + BrowserDetect.browser + ' ' + BrowserDetect.version + '</b> on <b>' + BrowserDetect.OS + '</b>. The OrderStream Pro Back Office works best with <a href="https://www.google.com/intl/en/chrome/browser/" target="_blank"><b>Chrome</b></a>.</p>');
                     }

                     if (IsIE10OrIE11) {
                         document.write('<p><b><font color="#CC3333">PLEASE NOTE :</font></b>  you are currently using <b>' + BrowserDetect.browser + ' ' +
                      BrowserDetect.version + '</b> on <b>' + BrowserDetect.OS + '</b>. This browser is not compatible for reporting tools but can be easliy made compatible.<a href="Instruction.htm" target="_blank"><b>Click here </b></a> to see the instruction for making it compatible. </p>');
                     }


// -->
    </script>

              <table cellpadding="2" cellspacing="0" border="0" align="center">
                <!--vx_ErrorTextStart-->
                <tr> 
                  <td align="right">&nbsp;</td>
                  <td><b><font color="#CC3333">^vx_ErrorText^ </font></b></td>
                </tr>


                <!--vx_ErrorTextEnd-->
                <tr> 
                  <td align="right"><b>Login ID: </b></td>
                  <td > 
                    <input name="uid" maxlength="65" onFocus="select()" onKeyPress="handleEnter(this)" tabindex="1" style="width:120px;" value="^vx_uid^" size="10">
                  </td>
                   </tr>
                <tr> 
                  <td align="right"><b>Password: </b></td>
                  <td> 
                    <input name="pwd" autocomplete="off" maxlength="65" onFocus="select()" type="password" onKeyPress="handleEnter(this)" style="width:120px;" size="10" tabindex="2">
                  </td>
                </tr>
                <tr> 
                  <td></td>
                  <td><a href="javascript:getPage('admin_forgot')">forgot 
                    your password?</a></td>
                </tr>
                <tr> 
                  <td></td>
                  <td> 
                    <input type="submit" name="Submit" value="Submit" class="buttonBlue8pt" tabindex="4">
                  </td>
                </tr>
              </table>
              <p>&nbsp;</p>
            </td>
          </tr>

          <tr>

          <td align="center">
          <div><iframe src="Footer.htm" frameborder="0" width="100%" ></iframe></div>
          </td>

          </tr>

        </table>
      </td>
    </tr>
  </table>
</form>
<!--monitormarker-login-->
</body>
</html>

The best solution for this kind of issues is using the Developer Console in browser (in this case IE 11 by pressing F12). 此类问题的最佳解决方案是在浏览器中使用开发者控制台(在本例中为IE 11,请按F12键)。

Load the page in IE with open developer tools (F12) in Network tab (Ctrl+4). 使用“网络”选项卡(Ctrl + 4)中打开的开发人员工具(F12)在IE中加载页面。 Don't forget to enable Network traffic capturing by clicking the Run button in top of the toolbar or simply hit the F5 key. 不要忘记通过单击工具栏顶部的“运行”按钮来启用网络流量捕获,或直接按F5键。

Double click on the URL with error and then see the response body for details. 双击错误的URL,然后查看响应正文以获取详细信息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM