In the first way, is "Unexpected Exception" the entire text of the
error? Assuming this is in Firefox, there's usually more detail than
that. If there's not, then try splitting that line across multiple
lines of code to see which step causes the exception.

I did a little test in Firefox to see if I could get your code working
(just for the first method). I changed:
var myWidth = svgdoc.ElementById('tooltipBoxLabel').getBBox().width;

to:

var myWidth = document.getElementById('tooltipBoxLabel').getBBox().width;

And I get the error:
uncaught exception: [Exception... "Component returned failure code:
0x80004005 (NS_ERROR_FAILURE) [nsIDOMSVGLocatable.getBBox]" nsresult:
"0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: file:///... ::
init :: line 22" data: no]

This is an internal error in Firefox and I think it might mean that
getBBox() isn't available in their implementation, even though the
function is there and you can call it. Someone please correct me if
I'm wrong. 



--- In [email protected], RODOLFO MORENO LLACZA
<[EMAIL PROTECTED]> wrote:
>
> Hi everybody
>   I am doing my tooltip in SVG. I have tried in two ways.
>   FIRST WAY:
>   this is my SVGDOC:
>   <symbol id="tooltipBox" overflow="visible" pointer-events="none" >
>       <g id="innerTooltipBox">
>      <rect id="tooltipBoxShape" x="500" y="0" width="10000"
height="1500" style="fill:yellow;stroke:dimgray;stroke-width:50px;"/>
>      <text id="tooltipBoxLabel"
style="font-family:monospace;font-weight:bold;font-size:1500px;fill:black"
x="650" y="1100" pointer-events="none">Label</text>
>       </g>
>   </symbol>
>    
>   <use id="tooltipBoxPlaceHolder" xlink:href="#tooltipBox" x="0" y="0" 
>   visibility="hidden" />
>    
>   in "tooltipBoxLabel" assign dynamically the text.
>    
>   Next I use:   This is my code in JavaScript
>     var myWidth = svgdoc.ElementById('tooltipBoxLabel').getBBox().width;
>    alert(myWidth )
>    
>   then JavaScript sends a Error mesage. " Unexpected Exception"
>    
>   SECOND WAY: This is my svgdoc
>    
>   <g id="tooltipBoxPlaceHolder" visibility="hidden" >
>      <rect id="tooltipBoxShapeNew" x="500" y="0" width="10000"
height="1500" style="fill:yellow;stroke:dimgray;stroke-width:50px;"/>
>      <text id="tooltipBoxLabelNew"
style="font-family:monospace;font-weight:bold;font-size:1500px;fill:black"
x="650" y="1100" pointer-events="none">Label</text>
>     </g>
>    
>   Next I use: This is my code in JavaScript
>       alert( tooltipBoxLabelElement.getBBox().width)
>    
>   then JavaScript sends: -3.39e+38 ( which is wrong value)
> 
>   What is the problem?
>    
>   Rodolfo
> 
>               
> ---------------------------------
>  Yahoo! Mail
>  Use Photomail to share photos without annoying attachments.
> 
> [Non-text portions of this message have been removed]
>






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