unbind example


HTML document 

<html>

<head>
<title>example</title>
<SCRIPT>
function unbind() {
 var diputree = parent.frames["diputree"].document.diputree;

 var docElement = "#/1";
 var first = "#xpointer(has/*)";

 diputree.unbind (docElement, first);

 diputree.refresh(100);
}
</SCRIPT>
</head>

<body>

<form>
<p>Unbind first node:
<p><input type="button" value="unbind" onClick="unbind();">

</form>

</body>
</html>

Explanation

Set up xpointer for the first node.

  var docElement = "#/1";
  var first = "#xpointer(has/*)";

Call the unbind method to delete it.

 diputree.unbind (docElement, first);


diputree documentation © 2000 dipu