2013-07-15 65 views
0

我使用簡單的模式JQUERY插件在我的MVC 4網站上彈出窗口,它的工作正常與CHROME和FIREFOX但不在Internet Explorer v10.0中,如果我在IE中打開該網站,它會拋出java腳本錯誤和模式彈出未出現簡單莫代爾彈出不工作在ie 10.0?

Unhandled exception at line 16, column 133 in http://localhost:55939/Scripts/jquery.simplemodal.1.4.4.min.js 
0x800a01b6 - JavaScript runtime error: Object doesn't support property or method 'removeExpression' 

在頁面佈局,我呈現以下腳本

<script src="@Url.Content("~/Scripts/jquery-2.0.2.min.js")" type="text/javascript"></script> 
    <script src="@Url.Content("~/Scripts/jquery.infieldlabel.min.js")" type="text/javascript"></script> 

下面是我Login.cshtml頁

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript" ></script> 
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript" ></script> 
<script src="@Url.Content("~/Scripts/jquery.simplemodal.1.4.4.min.js")" type="text/javascript" ></script> 


<div id="login" class="modal"> 

    @using (Html.BeginForm()) 
    { 
     <p class="heading"><u>Sign in to your Account</u></p> 
     <p> 
      @Html.LabelFor(m => m.Username, new { @class = "inlabel" }) 
      @Html.TextBoxFor(m => m.Username, new { @class = "infield" }) 
     </p> 
     <p> 
      @Html.LabelFor(m => m.Password, new { @class = "inlabel" }) 
      @Html.PasswordFor(m => m.Password, new { @class = "infield" }) 
     </p> 
     <table class="errorMessage"> 
      <tr> 
       <td height="10px"> 
        @Html.ValidationSummary(true, "Login was unsuccessful. Please correct the errors and try again.") 
       </td> 

      </tr> 
     </table> 
     <div> 
      @Html.ActionLink("Forgot your password?", "ForgotPassword") 
      <input type="submit" value="Sign In" class="submitButton" /> 
     </div> 

    } 

</div> 


<script type="text/javascript"> 
    $(document).ready(function() { 
     $("label").inFieldLabels(); 
     $("#login").modal({ overlayCss: { backgroundColor: '#CCCCCC' } }); 
    }) 
</script> 

我不確定是否存在與簡單的模式和jQuery插件的任何兼容性問題任何幫助將不勝感激。

非常感謝

回答

0

的問題是,IE想要的一切好的和整潔。無論如何,這是一個錯誤,你可以查閱一下我所說的

SimpleModal Bug in IE

2

見諾亞萊曼 - 豪普特回答這樣一個問題:Simple Modal, jQuery 1.8.0 and IE9

你需要編輯一行在jquery.simplemodal

// (Line 239) $.support.boxModel is undefined if checked earlier 
//browser.ieQuirks = browser.msie && !$.support.boxModel; 
browser.ieQuirks = browser.msie && (document.compatMode === "BackCompat"); 

這個問題重新出現的jQuery 1.10.1