[SWFObject] swfobject 1.4 broken in safari 2.0.3 in strict mode
Josh Santangelo
joshs at endquote.com
Thu Apr 27 23:06:49 PDT 2006
I'm working on a page which is in XHTML 1.1 strict, and SWF object
breaks in Safari. I thought I'd post about it before trying to fix it.
My document starts like this (served with an application/xhtml+xml header):
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:s="http://endquote.com/XMLShell/2.0/" xml:lang="en">
<head>
<meta http-equiv="content-type" content="application/xhtml+xml;
charset=utf-8" />
On line 161, it breaks if document.location.search is undefined.
Replacing that line with this:
var q = location.search || location.hash;
Fixes it.
Then it dies on line 106 with a "Dom Exception 7", which seems to mean
you can't write to the innerHTML (a div in this case).
It's looking like the solution is to do a bunch of DOM-style
createElement calls, then removeChild all the children of the target
node, then appendChild with the new Flash object.
I could go ahead and make that change, but I thought I'd check to see if
anyone can duplicate the error, or tell me why that solution would be a
bad idea.
thanks,
-josh
More information about the Swfobject
mailing list