Shihyen / swfobject

Automatically exported from code.google.com/p/swfobject
0 stars 0 forks source link

Addition to Q7 in the FAQs #210

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The Adobe kb400730 fix does not quite work out of the box with swfobject. 

Solution 2, the nested form one, is easy to apply and might work for some,
but it badly breaks the DOM in IE, so it might break other scripts that
reference forms directly, or page layout. 

Solution 1, on the other hand, doesn't work as indicated by Adobe. 
It  *requires* what Bobby suggests here:
http://code.google.com/p/swfobject/issues/detail?id=73&can=1&q=form#c6

Basically I suggest adding to the FAQ the following wording after the link
to kb400730:

Note that if you intend to use Solution 1, instead of copying Adobe's
script, you'll need to add the following after you call embedSWF or
registerObject:

swfobject.addDomLoadEvent(function(){window[mySwfId] =
document.forms[0][mySwfId];});

Original issue reported on code.google.com by razzari on 30 Oct 2008 at 10:52

GoogleCodeExporter commented 9 years ago
Or rather 
swfobject.addDomLoadEvent(function(){window["mySwfId"] =
document.forms[0]["mySwfId"];});
since most people will not be using a var ;)

Original comment by razzari on 30 Oct 2008 at 10:54

GoogleCodeExporter commented 9 years ago
Thanks for the feedback, I have updated Q7: 
http://code.google.com/p/swfobject/wiki/faq

Original comment by bobbyvandersluis on 31 Oct 2008 at 10:33

GoogleCodeExporter commented 9 years ago
> It is preferred to use the second solution [...]

It's actually the first one :)

Original comment by razzari on 31 Oct 2008 at 12:02

GoogleCodeExporter commented 9 years ago
First one it is :-)

Original comment by bobbyvandersluis on 31 Oct 2008 at 1:38