On Apr 12, 2005 5:29 PM, Jonathan Watt <[EMAIL PROTECTED]> wrote:
> On Apr 12, 2005 5:14 PM, riverside6 <[EMAIL PROTECTED]> wrote:
> >
> >
> > While window.document.embeds('FP').window is undefined,
> > window.document.embeds('FP') is defined, so the embed does exist.
> >
> > I have to think this is some setting on my machine, but at this point
> > I'm both helpless and clueless.  Please help!

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');
  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]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to