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

text value

Expand Messages
  • stf
    hello, i would like to know how to get the value of a TEXT tag in javascript with Netscape 4x ? ex: my_value thanks in advance
    Message 1 of 4 , Oct 6, 2000
    • 0 Attachment
      hello,
       
      i would like to know how to get the value of a TEXT tag in javascript with Netscape 4x ?
      ex:
      <text id="mytext".....>my_value</text>
       
      thanks in advance
       
      stf
    • Kevin Lindsey
      stf, Here s an example which gets the contents of one text element and copies it to another text element.
      Message 2 of 4 , Oct 6, 2000
      • 0 Attachment
        stf,

        Here's an example which gets the contents of one text element and copies it
        to another text element.

        <svg onload="get_text(evt)">
        <script><![CDATA[
        function get_text(evt) {
        var doc = evt.getTarget().getOwnerDocument();
        var text1 = doc.getElementById("mytext1");
        var data = text1.getFirstChild().getData();
        var text2 = doc.getElementById("mytext2");

        text2.getFirstChild().setData(data);
        }
        ]]></script>
        <text id="mytext1" y="1em">my value</text>
        <text id="mytext2" y="2em">this will be erased</text>
        </svg>

        HTH,
        Kevin
      • stf
        thanks Kevin, it was getData method, ok , i m really a beginner :) where are referenced all of these methods (setData, getData for text ...etc ? i was looking
        Message 3 of 4 , Oct 7, 2000
        • 0 Attachment
          thanks Kevin,
           
          it was getData method, ok , i'm really a beginner :)
          where are referenced all of these methods (setData, getData for text ...etc ? i was looking for some documents but not found...yet
           
          stf
           
           
           
        • Kevin Lindsey
          stf, If you re using Adobe s SVG Viewer, have a look at: http://www.w3.org/TR/2000/03/WD-SVG-20000303/index.html
          Message 4 of 4 , Oct 7, 2000
          • 0 Attachment
            stf,
             
            If you're using Adobe's SVG Viewer, have a look at:
             
             
            Between those three, you should find most of what you'll need.
             
            Have fun,
            Kevin
             
             
            ----- Original Message -----
            From: stf
            Sent: Saturday, October 07, 2000 4:31 AM
            Subject: [svg-developers] text value

            thanks Kevin,
             
            it was getData method, ok , i'm really a beginner :)
            where are referenced all of these methods (setData, getData for text ...etc ? i was looking for some documents but not found...yet
             
            stf
             
             
             
          Your message has been successfully submitted and would be delivered to recipients shortly.