Ajax Photo search using keywords with Drag & Drop
This is where we must drop the selected photos
Fields where the "id" fo the selected photo is added for sending:
The idea of this script is to allow keyword (tag) searches for images in a database
and then be able to drag them to boxes to be included in an article.
This script could be used, for example, for a blog or a CMS (content management system).
This is the basic process:
This script is a combination and adaptation of 3 scripts
- Search for photos using one of the following keywords:.
"people", "scene", "house", "number"
- The photos are extracted dynamically using AJAX from the database.
- Use the arrows to slide up and down through the list of fotos.
- Drag the selected photo to one of the boxes above.
- The "id" of the selected photo is written to a hidden form field for proccessing
- We can only have 1 photo per box.
Here is the zip file
of the whole working proccess.
It contains the following files:
- ajax.php *
- * for the demo this file uses an array of images - this will need to be modified to get the images from your database.
Thanks to Batalf for helping me out with this script adaptation.