I'm looking for a jquery plugin that will
- popup a gallery of previously uploaded images
- 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!
I'm looking for a jquery plugin that will
I've looked around and can't find any. Thanks for your help!
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: