onComplete (How can I catch or modify the 'on complete' event??)
datastorm - September 23, 2009 - 05:47
| Project: | FileField |
| Version: | 6.x-3.0 |
| Component: | Documentation |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Description
Hello,
I am trying to write a small add-on for my custom CCK form (i am using filefield to upload files).
How can I trigger a JS function after the file has been uploaded. ( I want to put a scaled version of the image after that CCK widget and do some other stuff to it, also I can't use imageField because my files can be photoshop files and etc.)
So after file is uploaded (name, size and type shown in the widget) I want to call a function in my custom JS file, I already have my custom JS file loaded.
Some code:
if ($(".filefield-file img").length > 0 ) {
callme();
}So something like that with jQuery, thing is that code is only loaded when the form is loaded, not when my widget is updated.
Can someone help me please?
