Comments (5)
Can you share your code please?
from filetodatauri.
Actually I am using the same code from your example , but I figure out that I placed the definition of the Flash variable in the wrong place so the SWF object could not call it so after I move it to.How ever it is now working except that in IE 9 the button title still "Charger Fichier" although the functionality is correct. I am thinking to solve that by hiding the button but I need to trigger click event on the SWF button. do you know how can I do it , your help is appreciated code is 👍
javascript :
swfobject.embedSWF("/Flash/FileToDataURI.swf", "file-object", "180px", "23px", "10", "SOL/Flash/expressInstall.swf", {}, {}, {});
from filetodatauri.
FileReader is not available in IE9, so only the Flash button should be loaded. I guess you didn't correctly copy my code.
// if the FileReader API doesn't exist, then we load the Flash
// that's the case with IE9
if (typeof FileReader !== "function") {
swfobject.embedSWF("dist/FileToDataURI.swf", "file-object", "80px", "23px", "10", "dist/swfobject/expressInstall.swf", {}, {}, {});
} else {
// otherwise we replace the HTML code '<object id="file-object"></object>' by an input file
$('#file-object').replaceWith('<input type="file" id="file-object" value="Load a file" />');
}
Your HTML code shouldn't contain an <input type="file">
but only <object id="file-object"></object>
, and then the JavaScript will either load the Flash, or change the object by an input file.
When I said I want to see your code... I need to see all the JavaScript part and the HTML part: the same code you can find on the example page.
(I'm French so we can discuss in french if you want :-p)
from filetodatauri.
I wish I can speak french but I do not know : )
You are right , I fix my code and know I almost get the same behavior on your example , the only difference is that in IE 9 the flash button text "Charger Fichier" (now I know that it is in french :-P) )
The project that I am working on SPA built with durandal.js and MVC on the server) so I will try to send you the code soon , but mean while can you advise if it is possible to trigger click event on the flash button ?
from filetodatauri.
"Charger Fichier" is the default label for the button in Flash. But it shouldn't show you "Charger Fichier" if you used the below code given in the example :
// it's the function called by the swf file
var Flash = {
/* getButtonLabel() permits to define another label for the "Load a file" button in the Flash version */
getButtonLabel: function() {
return "Load a file";
}
};
You're definitively doing something wrong....
And, no, I don't know if we can trigger the click event on the Flash button.
from filetodatauri.
Related Issues (8)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from filetodatauri.