开发者

Microsoft JScript runtime error: Object doesn't support property or method 'dialog' in jQuery

I have a problem of implementing the jQuery Dialog as Modal Form.



$(document).ready(function(){
$("#add-newItem")
           .button()
           .click(function () {
               alert('a');
               debugger;
               $("#dialog-form").dialog("open");
           });
});




Here execution is hitting the method and 开发者_运维技巧displays "Alert" as per  the code. After the it comes   to debugger and when I use "F10" it tries to execute the  "$("#dialog-form").dialog("open");

" and getting the error below...

Microsoft JScript runtime error: Object doesn't support property or method 'dialog'

I have properly given refence to the jQuery as below

  <script src="../../Scripts/jquery-1.5.1.min.js" type="text/javascript"></script>
  <script src="../../Scripts/jquery-ui-1.8.14.custom.min.js" type="text/javascript"></script>
  <link href="../../Content/ui-lightness/jquery-ui-1.8.14.custom.css" rel="stylesheet"               type="text/css" />


What could be the problem. If check using F12 of IE9 of my displayed page, I can list out the Dialog method from the script libray. but these are not vailable for the "$("#dialog-form")

regards,

Vinu


Do you have the <div id="dialog-form" /> ? Make sure the div element is present.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜