--- In svg-developers@yahoogroups.com, "zedkineece" <[EMAIL PROTECTED]> wrote: > > I am trying to change stroke colors for particular elements in my > SVG with no success. Here is my javascript code: > > function changeStrokeColor(e) > { > document.getElementById("MSSA").setAttribute('stroke', e > == "MSSA" ? 'red' : 'green');
You should use e.g. document.getElementById("MSSA").setAttributeNS(null, 'stroke', e == "MSSA" ? 'red' : 'green'); > <item onactivate="changeStrokeColor('MSSA')">MSSA</item> SVG 1.1 has no element named 'item' so I am not sure how that markup relates to SVG and script. Are you sure your viewer recognizes the item element and its onactivate event handler at all? Generally if you have problems with SVG and script it helps telling us exactly which SVG viewer you use. Also tell us whether you get any script errors. ------------------------ Yahoo! Groups Sponsor --------------------~--> Something is new at Yahoo! Groups. Check out the enhanced email design. http://us.click.yahoo.com/TktRrD/gOaOAA/yQLSAA/1U_rlB/TM --------------------------------------------------------------------~-> ----- 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/