Forum Moderators: open

Message Too Old, No Replies

Embed tag for svg and div

Embedding svg within a div tag

         

david_hcp

2:43 am on Oct 18, 2005 (gmt 0)



I am attempting to embed a svg file within a div tag. The div has some mouse events I want captured. This works when I remove the embed tag and simply put some image but when I attempt to place the embeded svg picture in the div tag the events are not seen. I have heard that embeded items go ontop of everything and that is why the events to not occur. Is there any work around for this so that the events associated with the div tag will fire?

This is the set up I need to work:

<div id="imap" style="position:relative;
visibility:visible;
left:0px;
top:0px;
cursor: pointer;
width:<?php echo $gpoMap->width;?>px;
height:<?php echo $gpoMap->height;?>px;
border-width:1px;
border-color:red;"
onmousedown="startRubber(event)"
onmousemove="moveRubber(event)"
onmouseup="stopRubber(event)">

<embed name = "examples" src ="<?=FRAMEWORK?>/SVG.svg" width = "<?=$gpoMap->width?> " height = "<?=$gpoMap->height?>">
</div>

Thanks for the help.

tedster

9:31 pm on Oct 25, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome to the forums, David. Sorry you've gone so long without a reply, but we were knocked off the web for an extended period and finally got back.

Have you tried the <object> tag instead of <embed>? I've read that there have been some issues with it on Safari, but it might be worth giving it a shot.