getting class of SVG element using Javascript

Discussion in 'Java' started by Jacqueline Snook, May 27, 2004.

  1. Hi,

    I am working on a website that uses a SVG diagram with multiple
    polygons (to represent rooms in a hotel). Each polygon has a class to
    represent whether the room is single or double. In a separate
    javascript file, I need to do a different action depending on the
    class. How do I read the class in the Javascript file. I tried using
    getAttribute("class"), but this does not work - IE comes up with an
    error stating 'The object doesn't support this property or method'.

    Any help would be greatly appreciated as this is doing my head in!!

    Jacqueline
     
    Jacqueline Snook, May 27, 2004
    #1
    1. Advertising

  2. Andrew Thompson, May 27, 2004
    #2
    1. Advertising

  3. Thanks!! (sorry)

    Andrew Thompson <> wrote in message news:<njw5dr4p45fs.yem01plsf5f8$>...
    > On 27 May 2004 10:08:55 -0700, Jacqueline Snook wrote:
    >
    > > Re: getting class of SVG element using Javascript

    >
    > You have the wrong group..
    > <http://www.physci.org/codes/javafaq.jsp#js>
     
    Jacqueline Snook, May 28, 2004
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Arne Nordmann
    Replies:
    0
    Views:
    552
    Arne Nordmann
    Jun 28, 2004
  2. Mardagg
    Replies:
    0
    Views:
    838
    Mardagg
    May 12, 2006
  3. Mardagg
    Replies:
    0
    Views:
    694
    Mardagg
    May 12, 2006
  4. milof83

    svg to svg saving problem

    milof83, Aug 18, 2006, in forum: Java
    Replies:
    1
    Views:
    879
    Roland de Ruiter
    Aug 18, 2006
  5. Jacqueline Snook

    Getting class of SVG element in Javascript

    Jacqueline Snook, May 28, 2004, in forum: Javascript
    Replies:
    2
    Views:
    183
    Thomas Meinike
    May 30, 2004
Loading...

Share This Page