--- In svg-developers@yahoogroups.com, "mmaker21" <[EMAIL PROTECTED]> wrote:


> The SVG document has a global onclick event handler, lots of hotspots 
> and simplified looks like this:
> ...
> <text class ="abc">
>   <a>
>     <text id="hot" x="0" y="0" onclick="testfn">message</text>
>   </a>
> </text>
> ...
> (I know that there are other ways to create hotspots but the above is 
> what I get)
> When I click the text element with the id "hot" I want to read the 
> parent's class name ("abc") and if it is "abc" then change that class 
> attribute to another class "def" and vice versa.
> 
> Unfortunaltely my attempts to get the parentNode's "class" attribute 
> with getAttribute fail.

The parent node of the <text id="hot"> element is the <a> element
while the <text class="abc"> element is the parent of the <a> element.
Not sure nested <text> elements make any sense but at least the XML
tree structure you have is e.g.
   text
    |
    ---a
       |
       ---text





-----
To unsubscribe send a message to: [EMAIL PROTECTED]
-or-
visit http://groups.yahoo.com/group/svg-developers and click "edit my 
membership"
---- 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/svg-developers/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/svg-developers/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[EMAIL PROTECTED] 
    mailto:[EMAIL PROTECTED]

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 

Reply via email to