Opened 14 years ago
Closed 13 years ago
#4558 closed bug (fixed)
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 (4)
Changed 14 years ago by
comment:1 Changed 13 years ago by
Resolution: | → duplicate |
---|---|
Status: | new → closed |
Duplicate of #4320, moved test case to there. Thanks!
comment:2 Changed 13 years ago by
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) {}
comment:3 Changed 13 years ago by
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
Yes, it was fixed for 1.4. Please try with the 1.4 beta and reopen #4320 (*not* this bug) with a test case if the problem still exists.
Test case