Initialize plugin after ajax request

49 views
Skip to first unread message

Pim Duijst

unread,
Feb 11, 2015, 7:12:19 AM2/11/15
to jquery-f...@googlegroups.com
Hope someone can help me out :)

I have a table with rows, each row contains an upload field where an image can be uploaded. The upload is processed with the jquery-fileupload plugin which works fine the first time. When the image is uploaded and processed, the table is updated with an ajax request. But after that I cannot upload an image again...

What am I doing wrong?

At first I fire the plugin as usual as described in the docs and that works fine so can please someone help me out? Let me know if code is requested.

Kind regards,

Pim

Stuart Kemp

unread,
Feb 18, 2015, 6:26:53 AM2/18/15
to jquery-f...@googlegroups.com
Without seeing your code, it's difficult to say what could be happening, but I'd guess the AJAX table update is rebuilding your entire table.
If that's the case, it'll probably override some values and listeners that the fileupload call set on them.

A solution would be to re-initilise the fileuploads after the AJAX callback, or to change the structure of the page, so your AJAX rebuild doesn't rebuild the elements controlled by the fileupload plugin.

Could you supply some code so we can see what's happening?

Cheers,
Stu
Reply all
Reply to author
Forward
0 new messages