I know how to work with php, mysql. I know enough to get results with CSS. I am now trying to incorporate some javascript and dhtml into my work. But what I want to do is a little more involved that the simple tutorials.
i am using ixedit to help me create a drag and drop workspace. I want to be able to drag an item, drop it into another item and have it then make the changes in my database. Kind of like dropping a file into a folder in Windows Explorer. My problem is in two parts. I will try to lay it out first.
I am not at my development pc, so I do not have the code to post right now. I will add it later tonight. I just want to get this thread created and start talking.
Here's the general framework though. I have a couple of css id's created. #filetobedragged and #foldertobedroppedinto. Each have the image locations, position, etc.
To create a 'file', I used <div id = filetobedragged> and for a 'folder' <div id= foldertobedroppedinto>
The javascript gives the usability. What each css id is supposed to do upon dragging and dropping. None of it is connected to the db just yet when anything is dropped.
The functionality is working fine, except when I add more than one file or folder. Since they will all have the same css id's. For example, I have it say 'thanks' when I drop a file into a folder. When I add the second folder, both folders says 'thanks'. Only the folder that the file was dropped into should say 'thanks'. But it's the id's that tell the javascript what to do. and both 'folders' have the same css id. This becomes even harder to work with when I begin to try to tell the db that 'file1' was dropped into 'folder2'.
so here are the questions.
How to I keep functionality while still maintaining the items' individuality? When I drop item 1 into folder 2, it should do the same stuff as item 1 into folder 3, but communicate the proper info to the db?
And secondly,what is the code needed to create the httprequest? The code that says, "when the file is dropped, call up 'senddatatodb.php'". I have learned through tutorials that you can use onReadyStatechange(), but that will that work here since it's <div>?
I understand that it might be hard to diagnose or offer advice based on this info. I will try to get the code i am using added when I get back to my pc.
Thanks for any help in the future.