Thanks for the replies. I indeed do have the svg encased with <script
type="image/svg+xml">.
Is it possible to get the svg object id from the event argument?
function onEnter(e) {
var posx = 0;
var posy = 0;
if (!e) var e = window.event;
if (e.pageX || e.pageY) {
posx = e.pageX;
posy = e.pageY;
}
else if (e.clientX || e.clientY) {
posx = e.clientX + document.body.scrollLeft +
document.documentElement.scrollLeft;
posy = e.clientY + document.body.scrollTop +
document.documentElement.scrollTop;
}
var targ;
if (!e) var e = window.event;
if (e.target) targ = e.target;
else if (e.srcElement) targ = e.srcElement;
if (targ.nodeType == 3) // defeat Safari bug
targ = targ.parentNode;
alert(posx + ' ' + posy + ' ' +
targ.id ); //
targ.id appears to be
empty?
}
On Jul 1, 7:12 pm, Bradley Neuberg <
bradneub...@gmail.com> wrote:
> Also, it looks like you aren't nesting your SVG inside of the HTML page in a
> <script type="image/svg+xml"> block:
>
> <html>
> <body>
> <script type="image/svg+xml">
> <svg>
> <circle/>
> </svg>
> </script>
> </body>
> </html>
>
> > <
svg-web%2Bunsu...@googlegroups.com<
svg-web%252Buns...@googlegroups.com>