0

I've looked high and low for an answer to this and I'm hoping someone has an answer, or at least a tip on how to avoid it.

I'm loading a static HTML file into a container via the jQuery load() method. This static HTML file has a script which loads a swf. When I load that particular file, I get the white screen of death (WSOD) and the page explodes and everyone in the room dies a horrible death.

I've had this happen also when using the jQuery wrap methods (wrap, wrapOuter, etc.) when a swf is present.

It seems manipulating the DOM with a container that has a swf object causes this. Does anyone have a solution or a way that I can prevent it happening?

Thanks!

trnelson
  • 2,715
  • 2
  • 24
  • 40
  • 1
    can you point us to the sample site? i do a lot of ajax loading swf with jqueryui even and never encountered this. – lock Apr 20 '11 at 00:02
  • 1
    Thanks for your comment. It seems like nobody else has encountered this issue, so I decided to do some digging. I was able to figure out a way around it which I believe gives insight to its cause. I believe it had to do with the way I'm writing the swf to the page, using document.write. I tried doing the same using the swfobject method embedSWF and that seems to work just fine. I think the combination of a document.write with DOM manipulation may have been the cause. – trnelson Apr 20 '11 at 13:10

1 Answers1

0

The only time I get white screen of death is because there is a JavaScript crash and the SWF never gets loaded.
Install HTTPFox for FireFox and see if the SWF is being loaded at all.
Most common bug for this would be a missing closing

}

This causes the browser not render the HTML

The_asMan
  • 6,364
  • 4
  • 23
  • 34
  • 1
    I did think of that too, but the javascript is fine. HTTPFox and Firebug show that no problems in loading anything. I think I did find the issue though--had to do with DOM manipulation paired with document.write, I think! So far so good, fingers crossed. Thanks for the comment. :) – trnelson Apr 20 '11 at 13:17
  • I marked yours as answer because it urged me to make some javascript changes, which ultimately led me to the solution! – trnelson Apr 20 '11 at 13:18