I'm being driven up the wall here trying to script something using the
"srcElement" property of an event.  Everything I read about
javascript/ecmascript in general says I should be able to use
something along the lines of "event.srcElement.id" to grab the id of
whichever element caused the event.  But whenever I do try to give
srcElement a property such as "id" or "type" or "src" or just about
anything, I get a "null or not an object" error.

I'm using a switch/case statement inside a "function
mouseover_listener(evt)" block.  I've got four SVG elements with the
mouseover event listener attached to them.  The attachment works,
because moving the mouse over any of the elements causes the "default"
line of the switch/case statement to execute.  But I can never manage
to get any of the specific cases to work.  What I think I should be
doing is using "evt.srcElement.id" in the switch/case statement and
then using the "id" attribute of each element for each case, but it
just never lets me use that.

The elements in question are rectangles with the "id" attribute
properly assigned.  (I've tried other attributes too.)  I'm under the
impression that "event.srcElement" is a reference to the element that
triggered the event in question, and that
"event.srcElement.someAttribute" accesses the attribute called
"someAttribute" of the given element.  Is this correct?  If so, what's
the problem?


Even if you can't answer these specific questions, a brief run-down of
how srcElement works with SVG elements would be nice.  Thanks for any
help you can give.



-----
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