View Full Version : Dragable Elements script

10-24-2006, 05:33 PM
I use this script and it works very good.
I read this post http://www.dynamicdrive.com/forums/showthread.php?t=7217&highlight=Dragable+elements+Script
I have the same problem as described in the post but I have to make something different.
I have a php page and some images that are draggable using the Dragable Elements script. I would like to know if it is possible to store in a mysql db the position of the images dragged by a user that connetcs to this page.
After that my goal is to have the same page loads the position of the images from this db so the next user who connetcs this page will view the images in the position chosen by the previous user.
In other words my goal is to obtain that every user displays this page with the images positioned by a previous user.
I hope I've been clear and I apologize for my bad english.

10-24-2006, 05:49 PM
Aw, I've gone for so long without using the stickies.

10-25-2006, 09:06 AM
Title script: Dragable elements Script
link: http://www.dynamicdrive.com/dynamicindex4/image3.htm

I'll try to explain my goal better.
I have my database with a 3 columns table. The columns are imagenumber (key) image_x_position an image_y_position.
X_position and y_position columns have initial value set by me. These values are those who make possible to display the images in the php page in the default position.
When a user reach via browser this php page, I need a php code that connects to this db, get the value of x and y of each image and display the page; really the first user who displays the page will view the images in the position set by me.
Images are draggable so a user can drag them within the page.
I also need a php code that overwrite the new x and y positions set by this user into the db so the next user who call the page via browser, will display a page different from the default one because images position is load from the db and it is equal to the position set by the previous user.
Is it possible to reach this?
thank you

10-25-2006, 01:48 PM
Any suggest?

10-26-2006, 10:53 AM
Any idea?

10-26-2006, 12:49 PM
Someone can help even with some web link?

10-26-2006, 03:53 PM
maybe you can make a ajax xmlhttp-request and bind it with some kind of onRelease-mousebutton-event ("onmouseup"), which triggers a js-function parametrized by the actual x/y-coordinates, that dispatches them to the ajax-call. this call can then do any server-side activities like db-inserts/updates etc..