Hello all.
I have some problems with an ajax call that should be quite simple and now I'm completely lost, so any help would be great.
Ok, let's go:
I have a web page working at this moment, ok, and I use $.get() to load a table into it (html format), this is working ok too. When user clicks in <tr> tags, I use $.get() another time to get some more html data, including an image as an <img src=". . .">.
the server send me the image only if a user loaded it previously from an external 'admin site', or HTTP 204 code if requested image doesn't exist.
I have two problems: First all, I'm unable to bind a load event to my image, no matter how I do it.
I tried $("img").on(), $("img").live() and both with $("img", data). I tried also with an Image object. All this code is in $(function(){ . . . }).
And the second one, How can I take the return code for an image from the load event? HTTP 204 will fire a load success event, as far as I read.
Does exist another way to proceed? If does, please, put me on the way.