I have an ajax call which I need to then load an 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!
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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!