Hi Doug.
>[...several good reasons that one question at a time is better...]
> If seems like you're creating the div and emed again and again. Why not
> just
> change the src attribute of the existing embed? This will be faster
> anyway,
> and works across browsers. Also, change the src with "blah.src =
> 'buh.svg'"
> instead of setAttribute.
>
> function ChangeImage( imageName )
> {
> var svgEmbed = document.getElementById( 'svgEmbedId' );
> svgEmbed.src = imageName + '.svg';
> }
>
>
Yes, the reason I didn't do that is that my attempts to redefine the src of
the embed the way you suggest didn't work in either IE or Opera. I was doing
virtually the same thing 'til I decided to I removeand rebuilt the embed
with a different source to get it to work in IE, but it still didn't work in
Opera. It had the same browser dependency if I used innerHTML of a div tag
containing the embed as well.
var em = document.getElementById("SS"); //"SS" is the id of the embed tag
var parent = em.parentElement;
parent.removeChild(em);
var E=document.createElement('embed')
E.setAttribute("src", filename)
E.setAttribute("id", "SS");
In short I can't figure any way to redefine the src of an embed that works
in either FF or Opera.
Thanks for your answer to question two as well -- the SVG may not have
script -- so it looks like a timeout that waits until the document is
present will have to do. I was really hoping for a method associated with
the getSVGDocument() that would tell me the status of its load, sort of like
an AJAX-like asynchronous thingy.
Cheers,
David
-----
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/