W3C home > Mailing lists > Public > www-svg@w3.org > June 2000

creating and inserting a new node in javascript

From: Justin Friedl <justin.friedl@aspentech.com>
Date: Fri, 9 Jun 2000 17:51:52 -0400
Message-ID: <B1612D837360D111A9C000805FBBCCC901E87D15@geoffrey.sea.aspentech.com>
To: "'www-svg@w3.org'" <www-svg@w3.org>
In HTML I want to create create an entire new SVG document dynamically and
replace it with the current one?
thanks in advance

<title>Untitled Document</title>
<script language="javascript">

  function putXML(){
  // Load the XML 
  var source = new ActiveXObject("MSXML2.DOMDocument");
  source.async = false;

  // Load the XSLT
  var style = new ActiveXObject("MSXML2.DOMDocument");
  style.async = false;
  var svgdoc = window.gantt.getSVGDocument();
  var contents = svgdoc.getElementById ('svgContents');
  var xxx = new ActiveXObject("SVGVIEWLib.IDOMDocument");    //how do I
create and new SVG document and how do I replace the old one?
  //newnode = contents.appendChild (newnode);
<body onload="putXML()" bgcolor="#ffffff">
<embed SRC="../svg/dummy.svg" id="gantt" height="100%" width="100%"
type="image/svg-xml" pluginspage="http://www.adobe.com/svg/viewer/install/">

Received on Friday, 9 June 2000 17:51:58 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:29:12 UTC