Loading ...
Sorry, an error occurred while loading the content.
 

Re: [svg-developers] document.write ?

Expand Messages
  • Jim Ley
    Ruud Steltenpool ... just ... Well, not if you insist on only using standards... (window.document == to the HTML
    Message 1 of 4 , Aug 1, 2002
      "Ruud Steltenpool" <r.g.steltenpool@...>

      > In HTML you can let part of the document be generated client-side by
      just
      > inserting something like the following in the body
      >
      > <script type="text/javascript">
      > document.write("<h1>hi there</h1>");
      > </script>

      Well, not if you insist on only using standards...
      (window.document == to the HTML document isn't true.)

      > Is this possible in SVG or any XML ?
      > I guess XHTML does it

      You use the various DOM methods (createElement, appendChild etc.), again
      due to the fact that the only way to access a Document is from DOM 2
      events, you have to rely on extensions, but these to exist, and you could
      use them to generate content inline like document.write.

      Jim.
    • jkporter7159
      document.write is actully valid (for backwards comp. in the HTML DOM ... side by ... again ... 2 ... you could
      Message 2 of 4 , Aug 4, 2002
        document.write is actully valid (for backwards comp. in the HTML DOM

        --- In svg-developers@y..., "Jim Ley" <jim@j...> wrote:
        > "Ruud Steltenpool" <r.g.steltenpool@s...>
        >
        > > In HTML you can let part of the document be generated client-
        side by
        > just
        > > inserting something like the following in the body
        > >
        > > <script type="text/javascript">
        > > document.write("<h1>hi there</h1>");
        > > </script>
        >
        > Well, not if you insist on only using standards...
        > (window.document == to the HTML document isn't true.)
        >
        > > Is this possible in SVG or any XML ?
        > > I guess XHTML does it
        >
        > You use the various DOM methods (createElement, appendChild etc.),
        again
        > due to the fact that the only way to access a Document is from DOM
        2
        > events, you have to rely on extensions, but these to exist, and
        you could
        > use them to generate content inline like document.write.
        >
        > Jim.
      • Jim Ley
        jkporter7159 ... Yep, but window.document isn t... the only DOM compatible way to get a Document object is via DOM events.
        Message 3 of 4 , Aug 5, 2002
          "jkporter7159" <jkporter@...>
          > document.write is actully valid (for backwards comp. in the HTML DOM

          Yep, but window.document isn't... the only DOM compatible way to get a
          Document object is via DOM events. window.document being a HTMLDocument
          is an extension.

          Jim.
        Your message has been successfully submitted and would be delivered to recipients shortly.