__md__ Posted February 10, 2010 Share Posted February 10, 2010 hi I have two list boxes which i can move data back and fourth does anyone know the code which will allow me to save data in the second list box for a future visit? Link to comment https://forums.phpfreaks.com/topic/191607-save-elements-within-a-list-box/ Share on other sites More sharing options...
Psycho Posted February 11, 2010 Share Posted February 11, 2010 It depends on what you mean by "save". I would assume you would want to save it on the server (i.e. using PHP or some other server-side technology). If so, you could simply have a JavaScript function that runs onsubmit of the form and selects all the elements in the list box. Then simply capture the posted values and save in a database, flat-file, etc. However, on the off chance that you aren't doing anything with the values, you could just use JavaScript to save the values to a cookie. You would probably want to modify the current script that adds/removes values to modify the cookie whenever a change is made. Link to comment https://forums.phpfreaks.com/topic/191607-save-elements-within-a-list-box/#findComment-1010517 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.