I just recently began working with SVG and my javascript is a bit rusty right now. Currently the example has a crude svg shape (will be replaced with a nicer one when the designer sends it over) and for brevity only includes the shape I’m working with (there will be multiple selectable parts).
I’m trying to change the text “Select an area below” to the id of the shape when it’s clicked/selected. In most svg tutorials I’m told to use “application/ecmascript” for the script type. I’m currently not seeing any errors in the debug. I would greatly appreciate someone taking the time to tall me what I may be doing wrong. Thank you!
http://jsfiddle.net/8hu0nh6o/2/