[svg-developers] Re: Calling SVG From HTML
I have found that there are lots of timing issues with different browsers. The onload handler on the HTML side gets invoked when the HTML file has fully loaded, but that does not necessarily mean its images included SVG images referenced by OBJECT, EMBED or IFRAME have been loaded yet. Because of this, the HTML onload handler might be getting invoked before the SVG file has been loaded. Instead, what you should try: (1) Use OBJECT instead of EMBED because OBJECT is the officially sanctioned element and is supported everywhere that SVG is supported natively, and because it is officially supported, you are more likely to find accurate specifications (2) Put an onload handler on the OBJECT tag for the SVG. This handler will get invoked when the SVG has successfully loaded. (3) Call getSVGDocument() in the onload handler for the OBJECT tag Jon Ferraiolo --- In svg-developers@yahoogroups.com, Oliver Boermans boermans@... wrote: On 13 July 2011 13:21, gmcaulee gmcauley@... wrote: script type=text/javascript![CDATA[ function sayHello() { alert(Hello from test.svg!!!); } // ]]/script It's similar to working between an iframe and the containing document. You can expose the function in the parent document. You can do this directly. // the HTML - Create an object before the svg loads var svg = {}; // test.svg - assign your function to that object parent.svg.sayHello = function() { alert(Hello from test.svg!!!); } // Once the SVG is loaded you can call it from the HTML svg.sayHello(); Actually looking back at my code I notice I define the object in the parent document taking care to not overwrite it if it already exists: var svg = svg?svg: {}; I don't remember exactly how that might be necessary. Maybe the timing of the loading of the svg was unreliable. HTH Ollie -- @ollicle - To unsubscribe send a message to: svg-developers-unsubscr...@yahoogroups.com -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/ * Your email settings: Individual Email | Traditional * To change settings online go to: http://groups.yahoo.com/group/svg-developers/join (Yahoo! ID required) * To change settings via email: svg-developers-dig...@yahoogroups.com svg-developers-fullfeatu...@yahoogroups.com * To unsubscribe from this group, send an email to: svg-developers-unsubscr...@yahoogroups.com * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
[svg-developers] Re: Announcement: Adobe to Discontinue Adobe SVG Viewer
Hi Marc, I think you misunderstood me. I was replying to Margie about how best to encourage Adobe to change their policy. I agree that Adobe isn't likely to rethink their commitment to Flash/Flex, but they might rethink some other things, such as making ASV available for downloads after 1/1/08, supporting ASV beyond 1/1/07, and/or donating the source code to open source. Jon --- In svg-developers@yahoogroups.com, m_verstaen [EMAIL PROTECTED] wrote: Jon, Do you seriously believe that Adobe will change its plans and modify the course of Flash/Flex to please one or two companies with no impact on Adobe's business? Come on Jon, among all people you should know how Adobe misslead everybody in the SVG community during the past few years. Giving people hope that Adobe can still be helpful is only helping killing SVG at this point. And I know this is not what you want. Marc --- In svg-developers@yahoogroups.com, Jon Ferraiolo jferrai@ wrote: Margie, Thanks for the kind words. In terms of possible next steps, I suggest finding a way to express your point of view (professionally, of course) within a blog or a forum that Adobe would read. (I don't know the degree to which Adobe monitors this forum and I am not sure what other industry forums they read these days.) An important thing would be to give detailed information about the business impact that you face. Adobe is likely to be more receptive if a company speaks up and talks about any specific difficulties that they will face and what Adobe could do about relieving those difficulties. Adobe is less likely to listen to people who simply get up on their soapbox. (I already did that.) Jon Jon Ferraiolo jferrai@ Web Architect, Emerging Technologies IBM, Menlo Park, CA Mobile: +1-650-464-7817 Marjorie Roswell mroswell@ To om svg- [EMAIL PROTECTED] Sent by: cc svg- [EMAIL PROTECTED] hoogroups.com Subject Re: [svg-developers] Re: Announcement: Adobe to Discontinue 09/07/2006 05:03 Adobe SVG Viewer AM Please respond to svg- [EMAIL PROTECTED] hoogroups.com Jon, That was beautifully written. Thank you for your work and advocacy in the SVG community. What's the next step for our community to take, regarding items 3, 4, and 5? Margie On 9/6/06, jon_ferraiolo jferrai@ wrote: Hi Pat, Now that I am a member of the community and no longer an employee of Adobe, here is my reaction: (1) First off, I believe that Adobe deserves a great amount of appreciation for their contributions to SVG and the open standards world for their activities in previous years. Adobe provided a high-quality free implementation of an SVG viewer at large expense. (Pat, you know this perhaps better than anyone.) Adobe also has provided (and presumably will continue to provide) excellent support for SVG in some of its products, particularly Illustrator. Adobe has also made large contributions within the standards community on SVG. (2) It is understandable that at some point Adobe would announce the end-of-life for Adobe SVG Viewer. Since the Macromedia acquisition (at least, perhaps even earlier), it is clear that Adobe doesn't consider the SVG viewer to be strategic. Also, browsers are adding SVG support natively. (3) HOWEVER, I believe that some of the details regarding this end-of-life announcement are unacceptable to the community and not in Adobe's own best interests. To me, it is OK to stop support (presumably developer support and security fixes) on Adobe SVG Viewer in the relative near-term, but instead of giving four months
[svg-developers] Re: Announcement: Adobe to Discontinue Adobe SVG Viewer
Hi Pat, Now that I am a member of the community and no longer an employee of Adobe, here is my reaction: (1) First off, I believe that Adobe deserves a great amount of appreciation for their contributions to SVG and the open standards world for their activities in previous years. Adobe provided a high-quality free implementation of an SVG viewer at large expense. (Pat, you know this perhaps better than anyone.) Adobe also has provided (and presumably will continue to provide) excellent support for SVG in some of its products, particularly Illustrator. Adobe has also made large contributions within the standards community on SVG. (2) It is understandable that at some point Adobe would announce the end-of-life for Adobe SVG Viewer. Since the Macromedia acquisition (at least, perhaps even earlier), it is clear that Adobe doesn't consider the SVG viewer to be strategic. Also, browsers are adding SVG support natively. (3) HOWEVER, I believe that some of the details regarding this end-of-life announcement are unacceptable to the community and not in Adobe's own best interests. To me, it is OK to stop support (presumably developer support and security fixes) on Adobe SVG Viewer in the relative near-term, but instead of giving four months of advanced notice (i.e., 1/1/07), it should be something measured in years, something in the range of 2-4 years. (Note: 5 years is the usual amount for developer-oriented software.) (4) It reflects badly on Adobe that it did not donate the ASV source code (at least the higher-level logic that sits above the graphics rendering engine) to open soure. If Adobe isn't going to use ASV, then it should give it to the community so they can use it. Given how Adobe promoted industry adoption of ASV in the early days and thereby convinced many developers to build mission-critical applications using SVG, it is the least that Adobe could do. (5) But the worst part of this announcement is the removal of ASV downloads as of 1/1/08, with no option for others to host a different ASV download site. As others have pointed out, this will be devastating to those poor souls who made a commitment to ASV in the past and need their deployed SVG applications to continue working in IE, which today has something like 80% market share and is unlikely to support SVG natively before a couple of years go by. This particular decision reflects badly on Adobe as a business partner with developers. If nothing else, I appeal to Adobe to rethink this part of their decision. How much does it cost a company to maintain a single web page that is already working? If ASV quits working in some situations, such as ASV not running under Vista, then just add text to the download page alerting people that ASV has been EOL'd and is known not to work with Vista. (But the better approach would be to open source ASV so that the community can fix any such bugs.) Jon Ferraiolo IBM Adobe has decided to discontinue support for Adobe SVG Viewer. There are a number of other third-party SVG viewer implementations in the marketplace, including native support for SVG in many Web browsers. The SVG language and its adoption in the marketplace have both matured to the point where it is no longer necessary for Adobe to provide an SVG viewer. SVG is an established vector image format. Adobe currently supports SVG in several of its authoring and server products, including Illustrator, InDesign, GoLive, Version Cue, Graphics Server, FrameMaker, and FrameMaker Server. Adobe customer support for Adobe SVG Viewer will be discontinued on January 1, 2007. For more information on this decision and answers to questions about the discontinuation of Adobe SVG Viewer, please see http://www.adobe.com/svg Yahoo! Groups Sponsor ~-- Check out the new improvements in Yahoo! Groups email. http://us.click.yahoo.com/7EuRwD/fOaOAA/yQLSAA/1U_rlB/TM ~- - 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/ * Your email settings: Individual Email | Traditional * To change settings online go to: http://groups.yahoo.com/group/svg-developers/join (Yahoo! ID required) * To change settings via email: mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] * 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/