Note that there are some explanatory texts on larger screens.

plurals
  1. POjQuery ajax and IE 7/8 - Not Loading Entire Page
    primarykey
    data
    text
    <p>I have a small portion of code to ajax a page inside of an element and hide specific elements from the dynamically loaded page. .load wouldn't seem to work with my changing of image paths, so I chose to use .ajax, instead.<br> Using the following code, I have success with Chrome, FF8, and IE9, but not IE7 or IE8. The top portion of the ajaxed page is not loading in IE7 and IE8, but in IE9, Chrome and FF8, the entire page loads fine.</p> <hr> <pre><code>&lt;script type="text/javascript"&gt; $(document).ready(function(){ $.ajax({ url: '/example/file.htm', dataType: 'html', cache: false, success: function(data) { $('.right-column-body-text #experts_area').append( data.replace(/&lt;img([^&gt;]*)\ssrc=['"](?:[^'"\/]*\/)*([^'"]+)['"]/gi, "&lt;img$1 src='../path/images/$2'") ); } }); }); $(window).load(function(){ setTimeout(function(){ $('.right-column-body-text #loading').fadeOut(500); $('.right-column-body-text #experts_area').fadeIn(1000); },500); }); &lt;/script&gt; </code></pre> <hr> <p>I tried adding an error log and nothing showed. Please let me know if there is a syntax issue.</p> <hr> <p><strong>Edit Below to Include HTML</strong></p> <hr> <p>Here is a portion of the HTML, specific to the area to ajax into - </p> <pre><code>&lt;div class="right-column-body"&gt; &lt;div class="right-column-body-text" id="right-column-body-text"&gt; &lt;div id="loading"&gt;&lt;img alt="loading" src="/coating/images/loading.gif" /&gt;&lt;/div&gt; &lt;div id="experts_area"&gt; &lt;!-- ajax here --&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class="right-column-body-right-hand" id="right-column-body-right-hand"&gt; &lt;/div&gt; &lt;/div&gt; </code></pre> <p>Now, if I understand the ajax function, it should load the entire page into that div container, including the head portion of the page. When I hit F12 and view the HTML in IE7 or IE8, I look in the experts_area div and the first portion of text that appears is half way down from the ajaxed page, at a completely random spot (but does continue until the end of the html). When I view that same thing in IE9, or another browser, it then includes the head and the page in its entirety. This is in viewing the HTML, so I do not believe it is merely a display issue.</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