Dynamically adding data and statesaving.
Dynamically adding data and statesaving.
Hi.
I am using the datatable to make playlists. So users can add songs to it dynamically. What I want to do is have it so when the page is refreshed all the songs that are currently in the playlist are still there,
how would I go about doing this?
Thanks
I am using the datatable to make playlists. So users can add songs to it dynamically. What I want to do is have it so when the page is refreshed all the songs that are currently in the playlist are still there,
how would I go about doing this?
Thanks
This discussion has been closed.
Replies
use ajax to call a server side script that retrieves the playlist with current contents, perform a save after a new row is added to the playlist, when a page refresh occurs you call the original ajax script to reload the datatable.
hope this helps
What I am doing is kind of like this example: http://datatables.net/release-datatables/examples/api/add_row.html
Notice how after rows are added in the example and the page is refreshed, the rows disappear. Would I be able to have those saved in cache somehow and then re load them on a page refresh?
where do the songs that feed the playlist come from? ie where do you fetch the song data from so that someone can add the songs to a playlist.
Seems like a pretty simple db operation to load/save, thinking I'm missing something...