persianmp3
New Member
Currently I have : \[code\]function AddToList(){ var myUL = document.getElementById("myul"); var newLI = document.createElement("LI"); newLI.innerText = "stuff To Add"; comments.appendChild(newLI);}\[/code\]which I am attempting to use to add to my ul which simply looks like:\[code\]<div id="myuldiv"> <ul id="myul"></ul></div>\[/code\]I am hiding/unhiding the myuldiv and my problem is that the elements that I add are disappearing/being deleted/reset the second I hide the div containing the ul (there is a form being used to do the adding that is being reset however I would not suspect that is the problem unless I am hugely mistaken). My question is how do I make the elements I add to the ul persist through hiding/unhiding the div they are contained within, or I guess through anything?