Note that there are some explanatory texts on larger screens.

plurals
  1. POIn IE8, yepnope not loading resource within iframe at 1st attempt
    text
    copied!<p>I am using jQuery modal dialogue, within dialogue we embedded iframe. iframe contain button "Show search result"</p> <p>At 1st attempt of "Show search result" button click, nothing happen. My result is not rendering in table (probably server request is not firing).</p> <p>It appears only when I switched to other tab of browser, 2nd time onwards table rendering properly. </p> <pre><code>var __run = function(getData) { yepnope({ test : $.fn.flexigrid, nope : [ 'www/css/flexigrid.css', '/www/javascripts/flexigrid.js'], complete : getData }); </code></pre> <p>When __run function called 1st time in IE8 then <strong>getData</strong> (passed function) should execute but not able to execute it.</p> <p><strong>This issue specific to IE8</strong></p> <p><strong>How to deal with above issue ? any quick suggestion ?</strong></p> <p>In other browser like Firefox and Chrome everything working fine.</p> <p>If I changed <strong>modal</strong> flag to <strong>false</strong> then 1st attempt of "Show search result" button click event, I am getting result in IE8, but we need modal dialogue so this is not good solution.</p> <pre><code>myWindow.dialog({ modal : false, </code></pre> <p><strong>Updated</strong> : <strong>Added Jquery UI dialogue code</strong></p> <pre><code> NewModalUI.popWindow = function($){ var mWindow = null, mFrame; var build = function(){ mWindow = $('&lt;div id="UI_modal" style="display:none"&gt;&lt;iframe id="UI_modalFrame" name="UI_modalFrame" width="100%" height="97%" SCROLLING="auto" frameborder="0"&gt;&lt;/iframe&gt;&lt;/div&gt;').appendTo($('body')); mFrame = mWindow.find('iframe') }; var isReady = function(){ return mWindow; }; var isVisible = function(){ return (!mWindow.is(':hidden')) }; var close = function(){ __log("Window closed ..."); mFrame.attr('src', ''); mWindow.dialog('close') }; var open = function(url){ if(!isReady()){ build() mFrame.bind('load.modalWindow',function(){ var $div = mFrame.contents().find('.submitContainerDiv'); if($div.find('.submitBtns').find('input').length == 1){ $div.hide() } }) mFrame.attr('src', url) mWindow.dialog({ modal : true, height: $(window).height()-100, minHeight: '250', maxHeight: '90%', width:'80%', minWidth : '50%', maxWidth:'90%', buttons : { 'Cancel':function(){ $(this).dialog('close') } }, beforeClose : function(){ mFrame.attr('src', '') } }) } if(!isVisible()){ mFrame.attr('src', url) mWindow.dialog('open') }else{ mFrame.attr('src', url) } }; return { window: mWindow, build : build, isReady : isReady, isVisible : isVisible, close : close, open : open } }(jQuery); </code></pre> <p>Also observed IE8 generated html code</p> <p>Either IE8 or yepnope adding onload event attribute with null value to script tag Ex. </p> <pre><code>&lt;script src="/www/javascripts/flexigrid_faster.js" onload="null"&gt;&lt;/script&gt; </code></pre> <p>2nd time onwards onload event attribute value changing for resources loaded by yepnope &amp; search result populated in grid. Ex. </p> <pre><code> &lt;script src="/www/javascripts/flexigrid_faster.js" type="script" height="0" width="0" onload="function(){k.call(this,r)}"&gt;&lt;/script&gt; </code></pre> <p>Hope for the best solution.</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