I recently tried to change the MIME type of my site to appilication/xhtml+xml, but now there seems to be a strange bug. When I add this line of code: so.addVariable("pagina", "0" ); or with any number as value (I didn't try strings), no content is written to the div in Firefox. It works good under IE. When I open the DOM inspector the div is empty. The previous content (for users without flash) is removed, but no swf! Any idea how to fix this? The problem is that I can't change the name of the parameter, because I lost the source of my swf file...
swfobject "can be used in valid HTML and XHTML 1.0 documents*, and is forward compatible, so it should work for years to come." * Pages sent as text/html, not application/xhtml+xml.
So, your MIME type is not compatible. SWFObject 2.0 is also not compatible with application/xhtml+xml.
http://veniogames.com/download.php Note that I commented out the line that gives the error. The MIME type still works a bit weird. W3c validator still says it's the wrong type but Firefox says it's the right one.
I guess it comes down to your need to use application/xhtml+xml as the MIME type. Everything else on the page looks fine to me. As I stated earlier, it is known that SWFObject will not work with application/xhtml+xml.
You can still use xhtml MIME type/validation, but set the type as text/html. You will still have a valid page, and your flash will work as it should. Is there any particular reason you are using application/xhtml+xml?
I guess that's the only solution. The only reason I wanted an other MIME type was because of the validator (I want no warnings), but I didn't even fix it for the w3c validator, so I'll switch it back. Thanks for the help! The only strange thing is... why does the second one work fine? (only on the page with the battle of the white eagle)