[development] Js event after image uploaded

Carl Wiedemann carl.wiedemann at gmail.com
Sat Nov 12 18:45:40 UTC 2011


This is probably an AJAX/AHAH request, and while I haven't looked at the
code I'm not sure there's any ability to hook into the callback from
outside.

Worst-case scenario, you could poll the DOM with a different script for the
element (or class) in question. Something like this is definitely crude and
inelegant, but could work:

var polled = false;
setInterval(function() {
  if(!polled && $('#element-in-question').length > 0) {
    polled = true;
    // Do your thang...
  }
}, 500);



Carl Wiedemann
Website design and development consulting
carl.wiedemann at gmail.com | skype: c4rlww



On Sat, Nov 12, 2011 at 11:07 AM, Idan Arbel <idan at arbel-designs.com> wrote:

> Hello,****
>
> ** **
>
> I have an image field form, and I want to run some js code after the image
> is uploaded and the preview is created…****
>
> I can’t seem to figure out what jquery event to use.****
>
> ** **
>
> I’d appreciate any help.****
>
> ** **
>
> Thanks****
>
> ** **
>
> Idan****
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/development/attachments/20111112/64014077/attachment.html 


More information about the development mailing list