Hi Hans,

if I remember correctly ASV3 does not implement this right: you have 
to add the onmouseover attribute to the use element to make it work. 
In ASV6PR it works the way you did it. 
evt.target.correspondingUseElement will let you modify the - well, 
like it says - corresponding use element :)

The workaround for ASV3 and ASV6PR:

<use id="black01 xlink:href="#foo" onmouseover="tooltip(evt)" />
...   
function tooltip(evt)
var elem = evt.target;
if(evt.target.correspondingUseElement) 
  elem = evt.target.correspondingUseElement;
alert(elem);
alert(elem.getAttributeNS(null,'id'));
}
...

Regards-
-Heiko

http://www.zuccaralloo.de/devgroup




--- In [email protected], "hmrupp" <hans-
[EMAIL PROTECTED]> wrote:
> 
> Hi! 
> I want to implement tooltips on elements which I reference by use.
> 
> <svg xmlns="http://www.w3.org/2000/svg"; width="100%" height="100%">
>       <script type="text/javascript">
>               function tooltip(evt) {
>                       alert("bla");
>               }
>       </script>
>       <desc>
>               <!-- put a description here -->
>       </desc>
>       <defs>
>               <circle r="50" cx="100" cy="100" fill="black" 
> onmouseover="tooltip(evt)" id="black" />
>       </defs>
> 
>       <svg xmlns="http://www.w3.org/2000/svg"; width="100%" 
> height="100%">
>               <use xlink:href="#black" />
>               <circle r="20" cx="200" cy="100" fill="red"  
> onmouseover="tooltip(evt)" id="red" /> 
>       </svg>
> 
> </svg>
> 
> The mouseover event is only fired when the circle which is not 
> created by use?
> How can I create a tootip on elements created with use?
> 
> Thanks,
> 
> Hans





-----
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/

<*> 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/
 



Reply via email to