I know that asking two questions at once can be a problem, but these are
only two and they are related:
I wish to allow the user to select which of multiple SVG files might become
the src of an embed in HTML.
The following works okay in IE/ASV but not in Firefox or Opera 9 and
question 1 is
1. How do I get it to work across browsers?
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", document.f.u.value) // f.u is an input of type:
file -- its value is recognized in Opera (and I think FF too)
E.setAttribute("id", "SS");
var D=document.createElement('div')
D.innerHTML="<B>"+document.f.u.value+"</b>"
parent.appendChild(D);
parent.appendChild(E);
var S=document.getElementById("SS")
alert("pause a moment until SVG is loaded")
SD=S.getSVGDocument();
The div tag (id="D") is created both in Opera and IE but not in FF
The embed is created in IE but not in Opera or FF
2. How do I know that the SVG document has loaded, so that I don't have to
put an alert()
between the building of the "embed" and the attempted read of the SVG
document? IE fusses if I don't pause between the two.
respectfully,
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/