0

I'm looking for a jquery plugin that will

  1. popup a gallery of previously uploaded images
  2. upon clicking one of the images, close the poup and insert the image's link into a textarea

I've looked around and can't find any. Thanks for your help!

Padraig
  • 3,197
  • 4
  • 18
  • 26
  • This is not a jQuery plugin but I believe it may be what you are looking for.http://cksource.com/ckfinder – Bob Tate Aug 27 '14 at 19:34

1 Answers1

1

It is not likely you will find a jQuery plugin that will do all that...

First, you will need some way of identifying what images have been uploaded. You can use a server-side language (PHP, ASP) to list the files and send the list to the page (perhaps storing the list in an <input type="hidden" field), or you can store the file names in a database such as MySQL, and then use a server-side language to send the list to the DOM. Note that you can use AJAX (jQuery is easiest) to request such a list interactively.

Here is a simple post about AJAX: AJAX request callback using jQuery

Next, the pop-up is a separate issue. Once you have the file list, you can use jQuery (again, significantly less verbose than javascript and, IMHO, easier) pop-up a dialog containing the desired image.

For a simple pop-up, I recommend the jQueryUI library's .dialog() statement.

Here is an example of jQUI dialog:

How to use Plugins for PopUp

Community
  • 1
  • 1
cssyphus
  • 37,875
  • 18
  • 96
  • 111