Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8714853
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T05:42:10+00:00 2026-06-13T05:42:10+00:00

I am trying to delete the parent of a clone node in JavaScript because

  • 0

I am trying to delete the parent of a clone node in JavaScript because when i restore the saved table it creates a duplicate of the same table below the original. So I need to delete the original table and just display the child table.

function Save(){
var table = document.getElementById("sudoku");
clone = table.cloneNode(true);  
}
//Create Restore Function
function Restore(){
document.getElementById("sudoku").parentNode.appendChild(clone);
table.parentNode.removeChild("table");
}

I have also tried this method I found on here on another thread but when I try use it stops the rest of my javascript working

document.getElementById("sudoku").parentNode.removeChild(document.getElementById‌​("sudoku"));

thanks in advance

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T05:42:12+00:00Added an answer on June 13, 2026 at 5:42 am
    function Restore(){
        var table = document.getElementById("sudoku"),
            parent = table.parentNode;
        parent.removeChild(table);
        parent.appendChild(clone);
    }
    

    Note that listeners may be on the table that was removed so you could have to re-attach them.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to delete MySQL table rows from a Web page using Perl.
I'm trying to delete all rows in a table using Castle ActiveRecord. Normally, I
I am trying to delete a child record when parent is deleted. There is
I am trying to delete an object from its parent object without success... When
I am trying to delete rows from a table using where column in (collection)
So I'm trying to create a fadeOut effect of a with class delete parent
I am facing an issue whlie trying to clone a parent div and then
I am trying to delete the child element in the dom from its parent
I am trying to create a table which captures parent child relationships, like a
I am trying to delete the li element which is the parent of the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.