Re: [svg-developers] how to display dynamic svg from database
Consider PHP also. Carto.net has some tutorials. http://www.carto.net/papers/svg/samples/serverside_svg_php.shtml Ronan Oger wrote: Hi, You require server-side programming to access a database. Your clientside (SVG/ecmascript) code is unable to access a database. Take any example of Perl with the DBI and SVG modules and your solution will be similar. Take a look at: http://www.roasp.com/ for some examples of using mysql and perl to dynamically generate svg. I think you will find it in http://www.roasp.com/tutorials/ , but I am not 100% sure where to look and I am on a train as I write this. Also, try typing Perl DBI SVG in google. You might get lucky there. Of course, what you do with Perl, you can do with any other *serverside* language. When SVG1.2 comes along, it *may* be possible to directly access a database. For now, though, you have to access the database through a webservice or a program or script on a webserver. Ronan On Tuesday 05 April 2005 00:43, pesdeep wrote: hi i am using mysql as a database. in the table x-coordinates and y- coordinates are stored. this coordinates are keep on changing. and i want to display that coordinates in svg as a dot(circle). In the database there are so many x-coordinates and y-coordinates. for each x-y coordinates i want to create an dot(circle)and display in the svg. suppose x=360 and y=270 then one circle (suppose r=5, cx=360, cy=270) is created and placed in the area x=360 and y=270. In the database the x and y coordinates are keep on changing therefore in svg also circle is moving according to their coordinates. i am facing the problem how to get dynamically database values into svg. i am used javascript and svg. i got information that from XMLHttp and getUrl() it is possible. so plz any one can help me how to use these two technologies to obtain dynamic svg because iam new to these technology. thanks in advance. deepak - 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 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/
Re: [svg-developers] parseXML and accessing nodes.
I added a while loop that throws me for a loop, no pun intended. svg id=svg g id=state /g g id=cntry g id=sean /g /g g id=nps /g g id=wtr /g /svg //parse content of the XML format to the variable node var node = parseXML(data.content, document); //New While loop. var child = node.firstChild.firstChild; while (child != null) { alert(child.nodeType); //Returns 3,1,3,1,3,1,3,1,3 child = child.nextSibling; } Why the 5 node type #3s? Is there any good reference on this topic? I have only found parseXML references that only superficially cover the topic. - 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/
Re: [svg-developers] Odd polygon behavior
Elaboration. The hole in the first one is the result of an intersection, and not the second. I cut and pasted a hole I knew to work into the same svg file, replacing the one that does not to create the 2nd svg file. This way I was comparing apples to apples. Rerun wrote: Below are two SVG files, I'd attach them, but they usually get rejected. They are similar in that they are created by postGIS from the same data. The first is an intersection, and the other is not. The hole in the first one is filled, and not in the 2nd one. I realize the coordinates are not exactly the same in the circle, a bug in postGIS I guess, but it seems that the hole in the first one should still exist. Thanks. SVG1 ?xml version=1.0 encoding=iso-8859-1? !DOCTYPE svg PUBLIC -//W3C//DTD SVG 1.0//EN http://www.w3.org/TR/SVG/DTD/svg10.dtd; svg id=map2 width=850px height=675px viewBox=-5800 -5000 11500 1 g fill=blue stroke=rgb(128,128,128) stroke-width=1px opacity=1 path d=M 2972 -3465 3090 -2614 3980 -1689 3980 2547 -3590 2547 -3590 -3465 2972 -3465 M 2083 -447 2082 -396 2081 -346 2079 -295 2076 -245 2073 -194 2068 -144 2063 -94 2057 -44 2050 6 2042 56 2034 106 2025 155 2015 204 2004 254 1992 302 1980 351 1967 400 1953 448 1938 496 1923 543 1907 591 1890 638 1872 684 1854 731 1835 777 1815 822 1794 867 1773 912 1751 957 1728 1001 1704 1044 1680 1087 1655 1130 1630 1172 1604 1214 1577 1255 1549 1295 1521 1335 1493 1375 1463 1414 1433 1452 1403 1490 1371 1527 1340 1564 1307 1600 1274 1636 1241 1670 1207 1704 1172 1738 1137 1771 1101 1803 1065 1834 1028 1865 991 1895 954 1924 916 1953 877 1981 838 2008 799 2034 759 2060 719 2085 678 2109 637 2132 596 2155 554 2177 512 2198 470 2218 427 2237 384 2256 341 2273 297 2290 253 2306 209 2321 165 2336 120 2349 76 2362 31 2374 -14 2385 -60 2395 -105 2404 -151 2412 -196 2420 -242 2426 -288 2432 -334 2437 -380 2441 -426 2444 -472 2446 -519 2448 -565 2448 -611 2448 -657 2446 -703 2444 -750 2441 -796 2437 -842 2432 -887 2426 -933 2420 -979 2412 -1025 2404 -1070 2395 -1115 2385 -1160 2374 -1205 2362 -1250 2349 -1295 2336 -1339 2321 -1383 2306 -1427 2290 -1470 2273 -1514 2256 -1557 2237 -1599 2218 -1642 2198 -1684 2177 -1725 2155 -1767 2132 -1808 2109 -1848 2085 -1889 2060 -1928 2034 -1968 2008 -2007 1981 -2045 1953 -2083 1924 -2121 1895 -2158 1865 -2195 1834 -2231 1803 -2267 1771 -2302 1738 -2336 1704 -2370 1670 -2404 1636 -2437 1600 -2469 1564 -2501 1527 -2532 1490 -2563 1452 -2593 1414 -2622 1375 -2651 1335 -2679 1295 -2707 1255 -2733 1214 -2760 1172 -2785 1130 -2810 1087 -2834 1044 -2858 1001 -2880 957 -2902 912 -2924 867 -2944 822 -2964 777 -2983 731 -3002 684 -3019 638 -3036 591 -3053 543 -3068 496 -3083 448 -3097 400 -3110 351 -3122 302 -3134 254 -3144 204 -3154 155 -3164 106 -3172 56 -3180 6 -3186 -44 -3193 -94 -3198 -144 -3202 -194 -3206 -245 -3209 -295 -3211 -346 -3212 -396 -3212 -447 -3212 -497 -3211 -548 -3209 -598 -3206 -649 -3202 -699 -3198 -749 -3193 -800 -3186 -850 -3180 -900 -3172 -949 -3164 -999 -3154 -1049 -3144 -1098 -3134 -1147 -3122 -1196 -3110 -1245 -3097 -1293 -3083 -1341 -3068 -1389 -3053 -1437 -3036 -1484 -3019 -1531 -3002 -1578 -2983 -1624 -2964 -1670 -2944 -1716 -2924 -1761 -2902 -1806 -2880 -1850 -2858 -1894 -2834 -1938 -2810 -1981 -2785 -2023 -2760 -2065 -2733 -2107 -2707 -2148 -2679 -2189 -2651 -2229 -2622 -2268 -2593 -2307 -2563 -2346 -2532 -2384 -2501 -2421 -2469 -2458 -2437 -2494 -2404 -2529 -2370 -2564 -2336 -2598 -2302 -2631 -2267 -2664 -2231 -2696 -2195 -2728 -2158 -2759 -2121 -2789 -2083 -2818 -2045 -2847 -2007 -2874 -1968 -2902 -1928 -2928 -1889 -2954 -1848 -2979 -1808 -3003 -1767 -3026 -1725 -3049 -1684 -3070 -1642 -3091 -1599 -3111 -1557 -3131 -1514 -3149 -1470 -3167 -1427 -3184 -1383 -3200 -1339 -3215 -1295 -3229 -1250 -3243 -1205 -3255 -1160 -3267 -1115 -3278 -1070 -3288 -1025 -3298 -979 -3306 -933 -3313 -887 -3320 -842 -3326 -796 -3330 -750 -3334 -703 -3338 -657 -3340 -611 -3341 -565 -3341 -519 -3341 -472 -3340 -426 -3338 -380 -3334 -334 -3330 -288 -3326 -242 -3320 -196 -3313 -151 -3306 -105 -3298 -60 -3288 -14 -3278 31 -3267 76 -3255 120 -3243 165 -3229 209 -3215 253 -3200 297 -3184 341 -3167 384 -3149 427 -3131 470 -3111 512 -3091 554 -3070 596 -3049 637 -3026 678 -3003 719 -2979 759 -2954 799 -2928 838 -2902 877 -2874 916 -2847 954 -2818 991 -2789 1028 -2759 1065 -2728 1101 -2696 1137 -2664 1172 -2631 1207 -2598 1241 -2564 1274 -2529 1307 -2494 1340 -2458 1371 -2421 1403 -2384 1433 -2346 1463 -2307 1493 -2268 1521 -2229 1549 -2189 1577 -2148 1604 -2107 1630 -2065 1655 -2023 1680 -1981 1704 -1938 1728 -1894 1751 -1850 1773 -1806 1794 -1761 1815 -1716 1835 -1670 1854 -1624 1872 -1578 1890 -1531 1907 -1484 1923 -1437 1938 -1389 1953 -1341 1967 -1293 1980 -1245 1992 -1196 2004 -1147 2015 -1098 2025 -1049 2034 -999 2042 -949 2050 -900 2057 -850 2063 -800 2068 -749 2073 -699 2076 -649 2079 -598 2081 -548 2082 -497 2083 -447 z/ /g /svg SVG2 ?xml
[svg-developers] PHP, SVG, PDF
I've started, with some success, writing a php script that uses PDFLIB to write out SVG in a PDF. It seemed like a good idea, but then I got to thinking about polygons that have holes in them. It started to seem more complicated than it was worth. Maybe I'm wrong. Does anyone know how PDF's handle such types of polygons? Also, the act of writing out the path statement with PDFLIB seems a bit tedious, although I have a solution, it seems processor intensive for large outputs. It looks like this: PDF_moveto($p,$x,$y); PDF_lineto($p,$x,$y); PDF_lineto($p,$x,$y); PDF_lineto($p,$x,$y); PDF_closepath($p); PDF_fill_stroke($p); One coordinate at time. Am I missing something? Is there an easier way to do this? If not, has anyone used PDFLIB to embed the SVG into the PDF? It looks like PDFLIB only embeds objects such as images. Are there any other PHP solutions? After much searching, I have come up with nothing. I've seen Kevin Lindsey's pearl script, I don't know pearl, so I haven't been able to decipher that. Don't know if it would matter. Any ideas with regards to a PHP solution would be appreciated. Thanks. Sean - 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/
[svg-developers] Panning
Maybe I should rephrase my question. Is there a way to freeze the SVG while my home-made panning tool is panning, similar to what the Adobe viewer pan tool doese? For large SVG content, panning can be slow otherwise. Thanks. - 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/
Re: [svg-developers] Panning
I want the SVG to move as I drag the mouse, similar to the Adobe viewer pan tool, but I want the svg to be clipped at the viewbox edges until the mouseup event. The adobe viewer clips around the edges until mouse up, making it very fast when moving the SVG around. [EMAIL PROTECTED] wrote: You asked how to keep it from refreshing svg until mouse up event. The svg doesn't change anything on its own, you do it in script. If you don't want anything to change until mouse up, then do your modifications to the SVG on the mouseup event. It sounds like maybe your doing a click and drag method of panning. Why don't you just store the clientx/clienty in a variable on mousedown, and hold them there until mouse up, then you can calculate the distance dragged and update your svg onmouseup event. --KG -Original Message- From: Rerun [mailto:[EMAIL PROTECTED] Sent: Friday, February 25, 2005 2:09 PM To: svg-developers@yahoogroups.com Subject: [svg-developers] Panning Maybe I should rephrase my question. Is there a way to freeze the SVG while my home-made panning tool is panning, similar to what the Adobe viewer pan tool doese? For large SVG content, panning can be slow otherwise. Thanks. - 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 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/
Re: [svg-developers] Panning
I thought about clipping, but that seems complicated. I also thought about the raster idea. This begs the question, can an svg, within viewbox only, be converted to a raster on mousedown? If it can, the rest is easy. [EMAIL PROTECTED] wrote: I wonder what effect appending a clip path around the svg would have? Maybe it would increase the performance? -Original Message- From: Pete d'Oronzio [mailto:[EMAIL PROTECTED] Sent: Friday, February 25, 2005 2:45 PM To: svg-developers@yahoogroups.com Subject: RE: [svg-developers] Panning I want the SVG to move as I drag the mouse, similar to the Adobe viewer pan tool, but I want the svg to be clipped at the viewbox edges until the mouseup event. The adobe viewer clips around the edges until mouse up, making it very fast when moving the SVG around. I think that the Adobe viewer is panning by moving a raster image around until you mouse up. When you mouse up, then it modifies the DOM and refreshes the image. I don't think there's any clipping being done, it's just that there's no (rendered) image around the edges to show. That said, I don't know how you could tell the Adobe viewer to do that. Though... If it's in your own app, (as opposed to a browser) you probably have access to that raster image yourself. You could move the raster image around yourself and then tell Adobe to refresh when you're done. hth -pete [EMAIL PROTECTED] wrote: You asked how to keep it from refreshing svg until mouse up event. The svg doesn't change anything on its own, you do it in script. If you don't want anything to change until mouse up, then do your modifications to the SVG on the mouseup event. It sounds like maybe your doing a click and drag method of panning. Why don't you just store the clientx/clienty in a variable on mousedown, and hold them there until mouse up, then you can calculate the distance dragged and update your svg onmouseup event. --KG -Original Message- From: Rerun [mailto:[EMAIL PROTECTED] Sent: Friday, February 25, 2005 2:09 PM To: svg-developers@yahoogroups.com Subject: [svg-developers] Panning Maybe I should rephrase my question. Is there a way to freeze the SVG while my home-made panning tool is panning, similar to what the Adobe viewer pan tool doese? For large SVG content, panning can be slow otherwise. Thanks. - 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 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/
Re: [svg-developers] Panning
The Adobe viewer doesn't allow me to create buttons for zoom and pan, and I also want to be able to reset my viewbox as I'm zooming and panning. I create maps dynamically out of a database depending on scale. Pete d'Oronzio wrote: I thought about clipping, but that seems complicated. I also thought about the raster idea. This begs the question, can an svg, within viewbox only, be converted to a raster on mousedown? If it can, the rest is easy. Question: If you're running in a browser, using the Adobe viewer... Why write your own pan routine? If you're not in a browser, but using the control as an ActiveX, getting the raster image wouldn't be too tough... - 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 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/
[svg-developers] suspend_draw/refresh whatever it takes
I've created my own pan tool and have disabled the adobe one, but I'm lacking one feature. How can I prevent the svg from being redrawn until the mouseup event. I've looked into suspend_draw, but it is either not appropriate, or I'm not using right. Thanks. - 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/
Re: [svg-developers] Getting Started creating Maps?
Do you use php, if so I have a script that exports straight from ESRI's shape to an svg file. The shape file is one of the more common sources of vector mapping data. tbone58x wrote: I would like to be able to create maps of the United States showing some of my own custom attributes (how many customers per state for example). While I can create some elementary SVG output, I have zero experience in generating maps. Where does one start? Is there a free source to extract existing maps (I assume state boundaries are path definitions) and convert them into SVG? If so, where and what tools do I need to convert from whatever base structure to SVG? Are there any tutorials or books on how to do this? I eventually want to be able to get down to the county level within a state, but I will take baby steps until I am ready for the next level. Any assistance on this endeavor will be greatly appreciated! - 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 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/
Re: [svg-developers] Adobe please distribute SVG Viewer ...MASSIVELY !!!
Native SVG in Firefox I believe is scheduled for March, but that may have changed With regards to IE, how hard would it be to develop an open source plugin? I don't know where to start to develop one, but it doesn't seem inpossible. What if a group was started to develop one? Start taking control of SVG's destiney. Why be slaves to Adobe and Microsoft? Just a thought. Rick Bullotta wrote: It certainly seems like Adobe is really pulling back from SVG in a large way. No (visible) significant work in the area in quite some time, marginal interoperability with Firefox, and so on. Quite a shame. I've always said that native SVG support in the browser would be the only way to achieve broad acceptance. Any one know a timetable for native SVG in Firefox? -Original Message- From: Jérôme Tricand de la Goutte [mailto:[EMAIL PROTECTED] Sent: Thursday, February 10, 2005 10:08 AM To: svg-developers@yahoogroups.com Subject: Re: [svg-developers] Adobe please distribute SVG Viewer ...MASSIVELY !!! Hi Renato, Yes, that's true, it would increase dramaticly the number of desktop with ASV, and it would be very benefic to SVG. But on the other hand, it reminds me the story of an operating system (???) distruting its favorite browser with itsself, reducing dramaticly any concurrent development. Nowadays, it's true, ASV is mainly THE SVG viewer. But it is only a standard in fact. I still hope there will be other viewers in the future. Jérôme Tricand de la Goutte Société Logatique 50 rue Marcel Dassault 92100 Boulogne-Billancourt 01 46 21 59 59 - 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 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/
Re: [svg-developers] Re: Mozilla/Firefox Issue, Please Help
I have a php solution that works for both IE and Mozilla if anyone is interested. It only requires one HTML/XHTML doc. They are the same, but I create them slightly different depending on browser type. academyhtml wrote: So even with the use of the object tag, with ASV there is no way to access the svg from scripts in the html through FF/Moz then? --- In svg-developers@yahoogroups.com, Jonathan Watt [EMAIL PROTECTED] wrote: On Tue, 08 Feb 2005 22:04:34 -, academyhtml [EMAIL PROTECTED] wrote: Would somebody be able to provide an example of what was suggested previously within the framework of the code I posted earlier: embed name=svgFile1... (in the html) svgdoc = svgFile1.getSVGDocument(); (in the js) Thx. As I said, you can't access the SVG document if you use embed. You need to use object. - 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 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/
Re: [svg-developers] Re: Mozilla/Firefox Issue, Please Help
You'll notice the mozilla version I write the SVG straight out, but with php you could pull this code from another file (ocean.svg and do the necessary replacements to make it work for instance) or a database. Jonathan Watt wrote: That shouldn't be too difficult to do, but I'd be interested nonetheless. On Wed, 09 Feb 2005 13:15:02 -0700, Rerun [EMAIL PROTECTED] wrote: I have a php solution that works for both IE and Mozilla if anyone is interested. It only requires one HTML/XHTML doc. They are the same, but I create them slightly different depending on browser type. - 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 . [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/
Re: [svg-developers] Re: Mozilla/Firefox Issue, Please Help
This is even better. Rerun wrote: You'll notice the mozilla version I write the SVG straight out, but with php you could pull this code from another file (ocean.svg and do the necessary replacements to make it work for instance) or a database. [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/
Re: [svg-developers] Mozilla/Firefox Issue, Please Help
I asked a similar question last night and Jonathan Watt replied with this: When using html:object in Mozilla you *can* access the SVGDocument object by using the HTMLObjectElement.contentDocument attribute. http://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-9893177 If you need to access the 'window' of the SVG document from a script in the HTML document you can access it via the defaultView attribute on the SVGDocument object. http://www.w3.org/TR/DOM-Level-2-Views/views.html#Views-DocumentView Hence to access a function called mySVGFunc in the SVG document from a script in the HTML document you would use: HTMLObjectElement.contentDocument.defaultView.mySVGFunc() I haven't quite figured it out yet, but it may help you find an answer. On Mon, 07 Feb 2005 13:49:33 -0700, Rerun [EMAIL PROTECTED] academyhtml wrote: Hi, I'm using an embed along with a getsvgdocument() to access SVG elements from an HTML file (see below). embed name=svgFile1... (in the html) svgdoc = svgFile1.getSVGDocument(); (in the js) After pouring through the messages here I realize why this doesn't work in FF/Moz, but I wasn't able to find an alternative way of accessing the SVG DOM from the html. Can anyone provide me with an alt. way I can implement this, not using getsvgdocument that will work on both IE and FF/Moz? TIA - 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 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/
Re: [svg-developers] Mozilla getStyle GetStyleData JavaScript etc
That worked great, and the code is even a bit cleaner. While I'm on the subject of Mozilla implementations, I have another question regarding scripting. Mozilla has implemented the embed tag reluctantly I see, but still advocates the object tag. This is all all well and good, but the object tag doesn't allow the use of JavaScript, neither does the embed tag in a Mozilla browser. Am I up a creek with this, or is there another way to add interactivity with js? Doug Schepers wrote: Hi, Rerun- You can generally avoid the whole issue by not using CSS. If you aren't using CSS classes, then you won't lose anything by using style attributes rather than properties. So, instead of: circle cx='10' cy='35' r='12' style='fill:red; stroke:green; stroke-width:3;'/ And accessing it with myElement.style.setProperty('fill', 'orange', ''); You can instead do: circle cx='10' cy='35' r='12' fill='red' stroke='green' stroke-width='3'/ And access it with myElement.setAttributeNS(null, 'fill', 'orange'); Most implementations will even render a bit faster if you omit CSS. Of course, CSS classes are still useful, so be careful: CSS style definitions override inline style attributes. Best not to mix and match. Regards- Doug doug . schepers @ vectoreal.com www.vectoreal.com ...for scalable solutions. Rerun wrote: | | | Thanks for the insight. It works on the mouseover, but on | mouseout I'm still having problems. The code below used to | return the object back to the original color, but now it | doesn't. I guess I don't how it works all that well. Any | ideas how to get this to work in Mozilla? Thanks. | | onmouseout=out('10','stroke') | | function out(id,what) { | svgobj = document.getElementById(id); | svgstyle = svgobj.style; | svgstyle.setProperty('fill', what, ''); | } | | Jonathan Watt wrote: | | On Sat, 05 Feb 2005 06:22:31 -0500, Thomas DeWeese | [EMAIL PROTECTED] wrote: | | | Hi couloir007, | | I don't know for sure about Mozilla but your example will work | with Batik, if you add the third parameter to setProperty, also I | think that you should access style as a 'property' not as a getter: | | svgobj = document.getElementById(id); | svgstyle = svgobj.style; | svgstyle.setProperty('fill', 'yellow', ''); | | | | | Actually do what Thomas has done and use the empty string | for the third | argument, not null. | - 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 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/