I have page that calls a flash – in this case a video – using SWFobject.
This page is being loaded inside a div with mootools AJAX.
For some reason the div does not display the flash inside. SWFObject does not seem to be executed when the page loads inside the div. The onload event is not triggered. I've tried to create a function and call that function oncomplete inside my mootool script but this did not worked either (function not defined).
Can someone tell me how to call the SWFobject after a page has loaded?
I've been looking for a solution for hours, I would be grateful if anyone can help me to fix this this problem.
yes the javascript gets called upon the page loading into the div but it doesnt appear that browser detection occurs. It works fine with the swfobject in the div being replaced, upon replacing the div.. the page inside the div doesnt work.
SWFObject's javascript is included on the page that has the div replacement as well. It seems to trigger the onload fine.. but when inside a div, iframe etc.. any type of nesting I've tried it doesnt work when the div is loaded or re-loaded.
Thanks for the help Geoff, great work on this, and I hope SWFFix is even more 'elitz' haha.
You can put the swfobject call inside a mootools function, so once the function which calls the ajax process have been completed, you can create the swfobject to write with javascript the code in the html, and it works!
Sorry, I can't show the example because the site is not finished yet.