Load swfupload via ajax call
I have an ajax call which I need to then load a开发者_C百科n instance of swfupload on. As far as I'm aware, swfupload has to be loaded on window load and code stuck in the head of the document.
Does anyone know how to load swfuploader from an ajax call?
Thanks!
It's amazing what a bit of sleep can do...
Here is how to load swfupload via an ajax (ish) call.
Scenario:
I call some html via AJAX and write it to my document. This HTML contains the elements for swfupload. Once the elemtns are written to the document, I then create the settings var and call a new SWPUpload instance (swfu = new SWFUpload(settings)). You need to ensure that all the js libraries are included within the parent page which the ajax is being called from. Easy!
精彩评论