0

I have a few draggable objects which I would like the user to drag around and then press "save" and return to the page the next day to drag them some more. The draggable objects include dynamic html with event handlers etc.

I want to store these objects in the DB and then be able to reload them.

What would be a good approach to achieve this?

One possible way I came up with is to store all DOM code within a container div, in the DB as a string, and then insert it into the page and run scripts to add new event handlers for the specific elements...

1 Answer 1

1

I guess storing them as a string is the best solution. Just put the column type "Long text" in the database!

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.