views:

264

answers:

2

Hello all, hoping you can help with this.

I have a link that redirects to a page on another one of our sites

However, when this redirect happens, I get a "document.body is null" error from JQuery, and a similar error from SWFAddress (_d.body is null); but only in IE.

However, when I enter the redirected to URL directly in IE (aka sans interstitial redirect), the JS error disappears. It seems this error only comes up when this page is being redirected to. Any ideas?

I heard similar issues happened when the document doesn't validate with its given Doctype (XHTML 1.0 Transitional in this case). The page had minor issues, but I've recoded the page to make sure it validated via the W3C validator on our DMZ server. Unfortunately, that doesn't seem to resolve the issue.

Any ideas what could be causing this? I talked to several Presentation coders on my team and they seem to be stumped. Any assistance at all is greatly appreciated.

Thanks in advance, - Frank

+2  A: 

Are you trying to access document.body outside of a "document.ready" scenario? IE tends to have problems with modifying the DOM before it's fully created, and will choke because of it.

Specific code samples would help a bit here; viewing the source in the links you provided didn't provide much insight, sadly.

Ryan McGrath
A: 

We found a work around. We setup a page that does a JS redirect instead of the original server side redirect we used. Using this method seems to have resolved the issue. Still, a very odd bug though...

Frank Rosario