SVG is alive and well

I have been working on a countdown timer for the 2010 New Years (work in progress) and decided to give SVG a try. And it works great in most browsers except IE of course. To work around this annoying limitation, I downloaded SVGWEB javascript library. This is an amazing library that detects IE and substitutes SVG with Flash.
Working with SVG is very easy since it becomes a part of your document DOM model. You can manipulate it with common used DOM methods: getElementById, getElementsByTagName and others.

6 Responses to “SVG is alive and well”

  1. Brad Neuberg Says:

    Thanks for the nice comment! Do you have any demos up? If you have any questions with SVG Web feel free to contact me.

    Best,
    Brad Neuberg

  2. Brad Neuberg Says:

    I found one small bug that keeps things from working on IE: you should use getElementsByTagNameNS instead of getElementsByTagName:

    svg_day1.getElementsByTagNameNS(svgns, ‘text’);

  3. Brad Neuberg Says:

    I found one other glitch that kept the Flash renderer from working; you re-use the same ID for the linear gradients and then reference them incorrectly. I’ve fixed both and put them here on my website if you want to see the source code:

    http://codinginparadise.org/projects/svgweb-staging/tests/non-licensed/countdown/HYBRID__808.html

    Just add ?svg.render.forceflash=true to see what things look like on IE:

    http://codinginparadise.org/projects/svgweb-staging/tests/non-licensed/countdown/HYBRID__808.html?svg.render.forceflash=true

  4. jacobdol Says:

    Brad, thanks for looking into it. I was wondering myself why it was not working. I see what you mean- I changed the id of svgs, but did not change the references to rect fill=”url(#SVGID_1_)” .
    I was wondering though if you had any ideas why the svg does not update in Safari on iPhone?

  5. Brad Neuberg Says:

    SVG Web doesn’t work on the iPhone; it used to but there has been a regression. I need to fix that.

  6. jacobdol Says:

    I was just asking in general about iPhone support for svg. it seems to work somewhat, but it does not update time on my page.

Leave a Reply