Hi all,
I am implementing a remove button from the list view of my site, where the user can click and it removes the particular article from a cloned list. I am using the code below to delete the div with article, but when I click the remove button at any point, it only deletes the most recent article and not the particular one I need out of the list. Secondly, I would like the user's list to reflect their cleaned out list even after they logout and log back in. Please help.
<div id="some">
<script>
function myFunction() {
var child = document.getElementById("some");
child.parentNode.removeChild(child);
}
</script>
I am implementing a remove button from the list view of my site, where the user can click and it removes the particular article from a cloned list. I am using the code below to delete the div with article, but when I click the remove button at any point, it only deletes the most recent article and not the particular one I need out of the list. Secondly, I would like the user's list to reflect their cleaned out list even after they logout and log back in. Please help.
<div id="some">
<script>
function myFunction() {
var child = document.getElementById("some");
child.parentNode.removeChild(child);
}
</script>