Hi Bruno,
Just a quick response, and apologize for not looking further into
your app.
JavaScript/ECMAscript is not happy with variable names that are
integers. Could that be the problem..?
Francis
Bruno Marquié wrote:
>
> Hi all,
>
> I need your lights!
> I am working with IE and ASV 3.
> I have a sample code (see below) , that does not return what I
would
> like....
> I would like to get from the function 'bboxSize' calls , different
> results (the same also) :
> the first alert popup displays 2/0/0 and the second 1/40/120.
> why? I was expecting to get first 1/400/400 and then 2/400/400....
( the
> width and the height specified in the g element referenced by the
use tag).
> Where is the problem? And can you explain me also this order..;
why
> bboxSize('2') is called before bboxSize('1') ?
>
> Thx for your help!
>
> Bruno
>
> <?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
> <!DOCTYPE svg SYSTEM "../svg10.dtd">
>
> <svg width="400" height="300"
> xmlns="http://www.w3.org/2000/svg"
> xmlns:xlink="http://www.w3.org/1999/xlink">
>
> <defs>
> <g id="reff" width="400" height="400">
> <rect x="0" fill="blue" width="40" height="40"/>
> <rect x="40" fill="white" width="40" height="40"/>
> <rect x="80" fill="red" width="40" height="40"/>
> <rect x="0" fill="none" width="120" height="40"
stroke="black"
> stroke-width="2"/>
> </g>
> </defs>
>
> <g id="1" onclick="bboxSize('1')">
> <use id="2" x="60" y="40" xlink:href="#reff" opacity="0.3"
> onclick="bboxSize('2')"/>
> </g>
>
> <script type="text/javascript">
> function bboxSize(id) {
>
> var elementBBox = document.getElementById(id).getBBox
();
> alert
('id:'+id+'/'+elementBBox.height+'/'+elementBBox.width);
> }
>
> </script>
>
> </svg>
>
-----
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/