PDA

View Full Version : Drag, Drop and Save.



Florx
11-01-2008, 08:48 PM
Hey,

I have been messing about with scriptaculous and making a drag and drop... then send an AJAX request to save the position in a database.

The boxes are created from the database and then put on the page.

http://omgrly.com/misc/draggy/testdrag.php

It has the posibility to turn into a Habbo Homes system or anything you want.

Want the source code for the php? Contact me on MSN ([email protected]).

Feel free to check out the source code.

Any ideas on what to use this for? Lol.

Thanks,
Jake.

Invent
11-01-2008, 09:12 PM
It seems to be a little...errr....messed up?..

Florx
11-01-2008, 09:15 PM
Ok,

How do you mean?

EDIT: Looks like im going to have to change the request to POST... :p

Invent
11-01-2008, 09:16 PM
DIVs are well off the page an stuff lol

Florx
11-01-2008, 09:32 PM
Thanks for pointing that out.

Ive changed the AJAX request method to POST so people can't mess with the variables.

Thanks,
Jake.

Hitman
11-01-2008, 09:39 PM
Hmm.. doesn't seem to work. Every time I refresh the page they're not how I left them plus the colours change. :S

php.net
11-01-2008, 09:40 PM
Hmm.. doesn't seem to work. Every time I refresh the page they're not how I left them plus the colours change. :S

Because someone else moved them lol.

Florx
11-01-2008, 09:40 PM
I disabled the AJAX save while I added some validation.

Somebody was messing it up lol. Try now :p

Thanks,
Jake.

Hitman
11-01-2008, 09:41 PM
Because someone else moved them lol.Ahh, that'll explain it. They must be fast then. :P

Want to hide these adverts? Register an account for free!