On Thu, Jul 14, 2011 at 10:48:50PM -0000, random_transform wrote:
                        .
                        .
                        .
> Ok, I fiddled some more and got it to work if I put init() in the handler for 
> a button, so it got called after everything was fully rendered, rather than 
> in <body> .  Still got an error with init() called from JQuery  
> $(document).ready, so that's probably a dead end.
> 
> So I guess it is indeed a timing issue with Chrome. Just for fun I tried to 
> call init() (as a function defined in the html) from onload in the svg 
> file...it doesn't find an init function.
                        .
                        .
                        .
This thread has confused me.  As I haven't kept up with the
exact source in play, I can't be certain; I suspect, though,
that your JavaScript coding simply is mistaken.  The namespace
of an embedded SVG instance is distinct from that of the 
main document.  I've been most successful with constructions
that look more like:

    <object id = 'map' type = 'image/svg+xml' data = 'special_map.svg' ...

    map = document.getElementById('map')
    svg_document = map.contentDocument;
    location = svg_document.getElementById(locator)

You have a piece of functionality you want to execute; you
apparently name it "init()".  Should it properly belong in
the SVG object, or the parent document?  Either can be 
coded effectively, but they're not identical.  I *think* 
you want the init() definition to appear as part of the 
SVG definition; in that case, you'll need to vector through
.contentDocument to access what "belongs" to the SVG.


------------------------------------

-----
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/

Reply via email to