Hi all,
I found out two main issues:
1. It works when I run the code over the server, which means that it
can read an xml file and extract nodeValue from it when it is run in
www web page. If i run it on my local machine (with both html and xml
files on the same folder), an error will pop up ("Object Required").
Why is this happen?
2. It seems to work only with XML file, but not SVG file!!!! I
thought SVG is one of the XML file as well and should work in the
same way. Could anyone give me some opinions on this?
Many Thanks,
Sam
--- In [email protected], "ddailey" <[EMAIL PROTECTED]> wrote:
> I've done something rather similar that works in IE and Firefox at
> http://marble.sru.edu/~ddailey/ajax.html
>
> Perhaps that will help.
>
> David Dailey
> ----- Original Message -----
> From: "samcctan" <[EMAIL PROTECTED]>
> To: <[email protected]>
> Sent: Monday, October 03, 2005 6:33 AM
> Subject: [svg-developers] reading SVG file via IE
>
>
> > Hi all,
> >
> > I use new ActiveXObject as to read my svg file. I tried this is
> > Firefox and it works fine, but not in IE.
> >
> > function readXML(url){
> > if (window.XMLHttpRequest) {
> > req = new XMLHttpRequest();
> > req.overrideMimeType ("text/xml");
> > alert("the req is " + req);
> > req.onreadystatechange = processReqChange;
> > req.open("GET", url, true);
> > req.send(null);
> > } else if (window.ActiveXObject) {
> > req = new ActiveXObject("Microsoft.XMLHTTP");
> > alert("The req is " + req); // nothing show up for the req
> > if (req) {
> > req.onreadystatechange = processReqChange;
> > req.open("GET", url, true);
> > req.send();
> > }
> > }
> > }
> >
> > In firefox, it shows "the req is [object XMLHTTPRequest], but in
IE,
> > it shows "The req is " (blank for req). This means that there is
no
> > new object created.
> >
> > Then when I continue the code as follow:
> >
> > var desc = svgDOM.getElementsByTagName('desc')
> > [0].firstChild.nodeValue;
> >
> > There is an error popping out: Object Required.
> >
> > Can anyone give me some advice as I haven't a clue what happen
here?
> >
> > Thanks in advance,
> > P.
> >
> >
> >
> >
> >
> > -----
> > 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
> >
> >
> >
> >
> >
> >
> >
> >
------------------------ Yahoo! Groups Sponsor --------------------~-->
Fair play? Video games influencing politics. Click and talk back!
http://us.click.yahoo.com/T8sf5C/tzNLAA/TtwFAA/1U_rlB/TM
--------------------------------------------------------------------~->
-----
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/