Re: Js event after image uploaded

"Idan Arbel" <[email protected]>
Newsgroups gmane.comp.php.drupal.devel
Message-ID <[email protected]>
Thanks..that is crude =) will try it.looking into the live() now.

 

Idan

 

From: [email protected] [mailto:[email protected]]
On Behalf Of Carl Wiedemann
Sent: Saturday, November 12, 2011 8:46 PM
To: [email protected]
Subject: Re: [development] Js event after image uploaded

 

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

[email protected] | skype: c4rlww





On Sat, Nov 12, 2011 at 11:07 AM, Idan Arbel <[email protected]> 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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.