Note that there are some explanatory texts on larger screens.

plurals
  1. PO"Microsoft JScript runtime error: Unable to get value of the property 'html':
    text
    copied!<p>I am trying to pop up a message if session times out and some error message comes back from my controller.</p> <p>My include is as follows....</p> <pre><code>&lt;link rel="stylesheet" type="text/css" href="&lt;%= ResolveUrl("~/Content/jqueryui/redmond/jquery-ui-1.8.16.custom.css") %&gt;"/&gt; &lt;link rel="stylesheet" type="text/css" href="&lt;%= ResolveUrl("~/css/slideshow.css") %&gt;"/&gt; &lt;script type="text/javascript" src="&lt;%= Url.Content("~/Scripts/ui/jquery-1.6.2.js") %&gt;"&gt;&lt;/script&gt; &lt;script type="text/javascript" src="&lt;%= Url.Content("~/Scripts/ui/jquery-ui-1.8.16.custom.js") %&gt;"&gt;&lt;/script&gt; </code></pre> <p>Here is the code:</p> <pre><code>&lt;% string AlertMessage2 = TempData["PublicAlertMessage"] as string; string AlertMessage2Title = TempData["AlertMessageTitle"] == null ? String.Empty : TempData["AlertMessageTitle"] as string; if( AlertMessage2 != null ) { %&gt; &lt;div id="AlertMessage" title=""&gt; &lt;/div&gt; &lt;script type="text/javascript"&gt; jQuery.noConflict(); $("#AlertMessage").html("&lt;center&gt;&lt;%= AlertMessage2 %&gt;&lt;/center&gt;"); $("#AlertMessage").dialog({ height: 240, width: 350, modal: true, title: '&lt;%= AlertMessage2Title %&gt;', buttons: { "OK": function () { $(this).dialog("close"); } } }); }); &lt;/script&gt; &lt;% } %&gt; </code></pre> <p>I am getting "Microsoft JScript runtime error: Unable to get value of the property 'html': object is null or undefined" when I implement the following Jquery dialog.</p> <p>Am I missing any include file? I have no clue and where to look! any ideas?</p> <p>Thanks!</p> <p>Now I can see the modal window... but getting error "Microsoft JScript runtime error: Object doesn't support property or method 'dialog'" in ok button</p> <p>This is in IE 9. When I try in Google chrome, I cannot close the modal window. </p> <pre><code>$("#AlertMessage").dialog({ height: 200, width: 250, modal: true, title: '&lt;%= AlertMessage2Title %&gt;', buttons: { "OK": function () { // $(this).dialog('close'); --&gt; comment this and try to run... no issues } } }); </code></pre> <p>what's wrong with the buttons?</p> <p>Update on 29th: If I remove the close functionality of ok, there is no error. But how do I close the modal window? any other work around? </p> <p>Update on Dec 2nd: This code does not work in IE 8 and IE 9. Also the pop up window does not close. But no problem in IE 7.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload