how can i do this, i wanna drag layer into another, then i`ll get alert !
the idea that i have some images, and i had put trash icon on down left of the browser, when i drag the image into the trash the image will be delete via php code, put i don`t how to make this with js , any idea ?
Originally posted by Richi ...when i drag the image into the trash the image will be delete via php code
You mean: When the mouse button is released and the image is dragged on top of the trash can => delete image?
On the mouse up event, check if (pixelLeft, pixelTop) * for the div with the image is between (pixelLeft, pixelTop) and
(pixelLeft + width, pixelTop + height) for the trash can div
* or (style.left, style.top)
To delete the image, call your deleteImage.php page with the image name as a parameter (use javascript to post a form, change location or popup a window with the php page as url)
Bookmarks