Question on Lightbox image uploader

Question on Lightbox image uploader

Hi Guys,

Here is what I am trying to do: I have various images on a page. I want to edit an image. So, I should click on the image and a lightbox should appear asking me for a new image files to upload. I select an image and click upload. It uploads the file and then the lightbox closes and the original image on the page gets replaced by the new one.

Now, I have looked around for jQuery plugins and examples to do this but I cannot come across something that can help me. I am kind of new to jQuery and need ideas how can I do it. I can create a lightbox(overlay) and call a php page on it to upload the image. But, then I don't know how to pass that back to the original page and update the image there through AJAX call.

I would need suggestions on what I can do or I am doing it wrongly or there is a better way to do it.

Thanks.