Hi Holger and Robert: Let me say you that the two ways I wrote initially don't work in ASV neither in FF 1.5. About the getBBox() function. It is implemented in both (in ASV and FF), because I tried with simple examples and work well in both. However I can't solve my issue, yet. please I need help. regards Rodolfo
Holger Will <[EMAIL PROTECTED]> wrote: Hi Rob afaik, getBBox() is implemented in firefox 1.5, but it does not work onload, see bug https://bugzilla.mozilla.org/show_bug.cgi?id=293581 you can get around this restriction by calling your function with setInterval("funcWithgetBBoxCall()",100). cheers Holger Robert Russell schrieb: > 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 svg-developers@yahoogroups.com, 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] > > > -- if this information was usefull, please try to help someone else ! http://www.treebuilder.de ----- To unsubscribe send a message to: [EMAIL PROTECTED] -or- visit http://groups.yahoo.com/group/svg-developers and click "edit my membership" ---- SPONSORED LINKS Xml format Svg Format Data --------------------------------- YAHOO! GROUPS LINKS Visit your group "svg-developers" on the web. To unsubscribe from this group, send an email to: [EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. --------------------------------- --------------------------------- Yahoo! Autos. Looking for a sweet ride? Get pricing, reviews, & more on new and used cars. [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/