I believe there is a defect in
An SVG Primer for Today's Browsers
Chapter V - Dynamic SVG and JavaScript
at
The code example
<ellipse cx="150" cy="75" rx="10" ry="40" fill="blue" onactivate="alert('ellipse') />
is missing a closing " for the onactivate parameter value, and hence should read
<ellipse cx="150" cy="75" rx="10" ry="40" fill="blue" onactivate="alert('ellipse')"/>