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

RE: [svg-developers] dynamicly changing xlink:href?

Expand Messages
  • Harrell, Wade
    I did that in the JavaScipt of the lower frame in this example: http://www.iguanastudios.com/rnd/svg/rnd002/index.html SNIPPET FROM THE SVG:
    Message 1 of 2 , Sep 1, 2000
    • 0 Attachment
      I did that in the JavaScipt of the lower frame in this example:
      http://www.iguanastudios.com/rnd/svg/rnd002/index.html

      SNIPPET FROM THE SVG:
      <a id="anchur" xlink:href="data.asp.html" target="_new">

      SNIPPETS FROM THE JAVASCRIPT:
      svgAnchor = svgdoc.getElementById('anchur');
      var newAnchor = svgAnchor.cloneNode(true);
      linkURL = ("data.asp?firstName=" + firstName + "&lastName=" + lastName +
      "&department=" + department);
      newAnchor.setAttribute('xlink:href',linkURL);

      This is likely more complicated that what you are trying to do, but I think
      it gets the point across.

      Wade Harrell * Sr Content Engineer
      Iguana Studios Inc * 16 W 19th * 10th Floor * New York, NY 10011 - 4205 *
      http://www.iguanastudios.com
      Latitude: 40.739145 (40° 44' 20" N) * Longitude: -73.992089 (73° 59' 31"
      W)
      wade@... * vox:212.209.1380 * fax:212.243.6506

      -----Original Message-----
      From: Eric Huisman [mailto:eric@...]
      Sent: Friday, September 01, 2000 12:28 PM
      To: svg-developers@egroups.com
      Subject: [svg-developers] dynamicly changing xlink:href?


      I'm trying to change a xlink of an image in a SVG-document using a
      javascript-function.
      I thought I read a message/tutorial about this, but I cannot find it
      back again. Can anybody give me a hint?

      Thanks in advance,

      Eric Huisman
      Indicate, the Netherlands


      <svg>
      ....
      <g id="ejhuisman" transform="translate(116,55)">
      <image width="74" height="79"
      xlink:href="images/ejhuisman.jpg">
      <title>foto ejhuisman</title>
      </image>
      </g>
      ...
      </svg>
    Your message has been successfully submitted and would be delivered to recipients shortly.