Hi, I have small examples of accessing a embed in IE and ASV3.x: http://www.resource-solutions.de/svg/meldermover/index.htm or http://www.resource-solutions.de/svg/viewbox_map/
Mit freundlichen Gr��en/Regards Chris Peto Freelance System Development, Resource Solutions Founding Partner, Vectoreal ------------------------------------- Germany Mobile: +49 (0) 173 308 7843 Tel:+49(0) 6103 80 21 98 http://www.resource-solutions.de <http://www.resource-solutions.de/> http://www.vectoreal.com <http://www.vectoreal.com/> SVG editor: http://www.resource-solutions.de/svgeditor.html mailto:[EMAIL PROTECTED] ------------------------------------ Member of: SPARK - SVG Programmers' Application Resource Kit SVG site: http://www.schemasoft.org/svg/main.svg HTML site: http://www.schemasoft.org/ -----Original Message----- From: Jonathan Watt [mailto:[EMAIL PROTECTED] Sent: Dienstag, 12. April 2005 18:57 To: [email protected] Subject: Re: [svg-developers] Re: MHTML (web Archive) / SVG / Javascript problem On Apr 12, 2005 5:52 PM, Jonathan Watt <[EMAIL PROTECTED]> wrote: > BTW, a more portable way to get the SVG document and it's global > "window" object is to use a function like the one below from your > HTML. Your HTML scripts should then be able to access your SVG in > Mozilla as well, and hopefully also in Batik. > > function setSVGVars() > { > // create two global variables that should point to the SVG document > // and its window > window.svgdoc = null; > window.svgwin = null; > > // get the embed object using getElementById! > var embed = document.getElementById('embed_id'); In fact I should really have put in a check here to make sure the embed object was found. Something like: if (!embed) return; > try { > // ASV doesn't allow us to test for getSVGDocument so we just have > to call it. > // We should catch exceptions thrown by browers that don't support it. > window.svgdoc = embed.contentDocument || embed.getSVGDocument(); > } > catch (e) { > // ignore exception and check whether svgdoc == null later > } > window.svgwin = svgdoc && svgdoc.defaultView || embed.window || null; > } > > After calling this function you should be able to access your SVG > document using svgdoc, and access functions and variables defined in > scripts in your SVG document using svgwin.functionOrVariableName. > > If the SVG document couldn't be accessed then svgdoc will be set to > null. If the SVG document's global "window" object couldn't be > accessed then svgwin will be set to 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 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] <mailto:[EMAIL PROTECTED]> * Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service <http://docs.yahoo.com/info/terms/> . [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/

