Hi, in swfupload.js line 133 you have the function:
SWFUpload.prototype.loadFlash = function () {
}
At line 142 you have:
// Get the body tag where we will be adding the flash movie
targetElement = document.getElementsByTagName("body")[0];
Would it be possible to allow this to be set by a variable, for example element_ID:
swfu = new SWFUpload({
...
element_ID : 'my_DIV';
});
And then have the Flash object created as a child of that element rather than at the end of "body" ?
So basically like this:
// Get the body tag where we will be adding the flash movie
if (this.settings.element_ID)
targetElement = document.getElementsById(this.settings.element_ID);
else
targetElement = document.getElementsByTagName("body")[0];
Would be amazing!
Thanks!
Tosh
Is possible
It is possible. And you can feel free to modify it to work that way if you want.
In the next version this will be standard behavior because of changes in Flash Player 10.
We didn't do this in the current versions for 2 reasons: 1) you can't see the flash movie anyways so it's just easier to append it to the body. 2) In IE if the Flash Element is inside a Form things break (but it's not terribly difficult to work around that).