Side navigation
#4558 closed bug (fixed)
Opened April 19, 2009 10:33AM UTC
Closed December 09, 2009 05:32PM UTC
IE error when redirecting
Reported by: | joseprio | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | 1.4 |
Component: | support | Version: | 1.3.2 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
While using JQuery and JQuery UI I get the following error in Internet Explorer 7 when I try to change the 'window.location' during load:
Line: 3203
Error: 'document.body' is null or not an object
That line in jquery.js is:
document.body.appendChild( div );
(it's part of support.js)
I would put a 'try... except' block in that function, or check for 'document.body'.
I'm attaching a simple test case.
Attachments (1)
Change History (3)
Changed October 19, 2009 01:54AM UTC by comment:1
resolution: | → duplicate |
---|---|
status: | new → closed |
Changed December 09, 2009 12:31PM UTC by comment:2
resolution: | duplicate |
---|---|
status: | closed → reopened |
This error still exists with MSIE 8.0 and jQuery 1.3.2.
I was checking a page in its HEAD-section using JS if it is shown in my desired frameset. If it was not, I was using top.location.replace() to change the location so my frameset would be loaded.
The error occured on a few pages, not all... it seems to depend on how much data (JS & HTML) is being loaded for the complete page that does the frameset-check.
Putting try/catch around lines 3202 - 3204 fixed this...
try {
document.body.appendChild( div );
jQuery.boxModel = jQuery.support.boxModel = div.offsetWidth === 2;
document.body.removeChild( div ).style.display = 'none';
} catch(e) {}
Duplicate of #4320, moved test case to there. Thanks!