Note that there are some explanatory texts on larger screens.

plurals
  1. POJQuery Dialog Re Open Error
    primarykey
    data
    text
    <p>I am fairly novice with JQuery. I am using the Dialog box to popup a window that displays a page from an external site.</p> <pre><code>&lt;script type="text/javascript"&gt; $.fx.speeds._default = 400; jQuery.support.cors = true; $(function () { $("#cmdLaunchInDiv").click(function () { $("#dialog-modal").dialog({ autoOpen: false, height: 845, width: 820, show: "scale", hide: "scale" }); $.ajax({ url: 'http://www.mycompany.com/geturl/?userid=' + document.getElementById("txtUserId").value, dataType: 'json', success: function (data) { $('#dialog-modal').html("&lt;iframe id='iFr' style='height:800; width:800; overflow: hidden;' height='800' width='800' scrolling='no' src='" + data + "'&gt;"); } }); $("#dialog-modal").dialog("open"); return false; }); }); </code></pre> <p></p> <pre><code>&lt;div id="dialog-modal" title="My Page" &gt; &lt;/div&gt; </code></pre> <p>The Ajax call gets the URL I want to load based on the userid. if I do not use the line jQuery.support.cors = true; the Ajax call does not work, I am not sure why the line fixed that problem but my searching suggested it would.</p> <p>The problem is that when I first run the page all works fine. I enter my userid click the button the div opens and the page loads as expected. I then close the dialog using the built in close X on the top right of the dialog box and the box closes as expected. However if I try to open the dialog again I get an error in JQuery-1.8.0.js</p> <p>Microsoft JScript Runtime Error: 'Array' is undefined</p> <pre><code>// Save a reference to some core methods core_push = Array.prototype.push, //&lt;=== This line core_slice = Array.prototype.slice, core_indexOf = Array.prototype.indexOf, core_toString = Object.prototype.toString, core_hasOwn = Object.prototype.hasOwnProperty, </code></pre> <p>I cannot find anything to help me find out what the problem is and have rewritten my Jquery a number of times.</p> <p>UPDATE: This error is in IE9. In Chrome and Firefox the dialog box opens and closes correctly but the content is not displayed unless the page I am trying to load in on the same domain.</p> <p>Can anyone point me in the right direction please?</p> <p>Many Thanks</p> <p>Fred</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

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