I am new to dojo. I have three divs; the first div has 10 pictures and other two divs are empty.
I want to allow the user to drag pictures to any div (2,3) or drag back to div1.
I want to store the pictures in a DB using PHP.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
As for the dragging and dropping, you’ll need to use
dojo.dnd.Source.In your Js, you’ll need:
Your HTML will look like this (for the most part):
I set up a simple example using google’s logo that you can drag from one div to another on jsbin.
As for saving to a database, I’m unclear on what you want to save. The src? Something else?
That being said, you could use
dojo.queryto get the images of a certain div to call anxhrGetto your PHP page/service.Basically: