[TYPO3-dev] Video portals
Thomas "Thasmo" Deinhamer
thasmo at gmail.com
Tue Jun 1 00:47:59 CEST 2010
Am 01.06.2010 00:35, schrieb Franz Koch:
> Second it doesn't work if you've set "moveJsToFooter" (or how it's
> called), as the inline JS of swfobject will be executed before it's
> actually loaded, and I again didn't see a way on how to force swfObject
> to get included in the header. So, are there any plans on improving this?
I've come upon this also a few times now, and I think the swfobject js
library is capable of inserting the flash element into a DOM element
with a specific id-attribute. So it should be possible to NOT write the
js code inline, but rather just call it in a external file - which can
be minified/put to the bottom of the page easily - and replace the
specific element, identified by the id-attribute.
Like this:
<html>
<head>
<script type="text/javascript" src="swfobject.js"></script>
<script type="text/javascript">
swfobject.embedSWF("myContent.swf", "randomID", "300", "120");
</script>
</head>
<body>
<div id="randomID">
<p>Alternative content</p>
</div>
</body>
</html>
That way it would be possible to put the JS into the footer etc.
Thomas
More information about the TYPO3-dev
mailing list