All pastes #950766 Raw Edit

Unnamed

public text v1 · immutable
·published 2008-03-20 20:37 UTC
rendered paste body
function clearChildren(node) 
{
  while (node.hasChildNodes()) 
    node.removeChild(node.firstChild); 
  return node; 
}

function clear_depths(start_by)
{
  var empty = document.createTextNode("123");
  for(i=start_by;i<=10;i++) {
    element = document.getElementById("depth"+i);

    // I need this step that give me the node from the element

    clearChildren(node);
    node.appendChild(empty);
  }
}