Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries >Thread Prev - Re: data island creation using reponseText >Thread Next - Re: data island creation using reponseText Re: data island creation using reponseTextTo: NULL Date: 7/5/2007 11:13:00 AM
On Jul 5, 1:02 pm, clockem...@alltel.net wrote:
> On Jul 5, 11:56 am, Martin Honnen <mahotr...@yahoo.de> wrote:
>
>
>
>
>
> > clockem...@alltel.net wrote:
> > > document.getElementById("xmlDataIsland").InnerXml =3D strXML;
>
> > There is no property named InnerXml defined on xml elements. If you want
> > to load a new document then simply use
>
> > document.getElementById("xmlDataIsland").XMLDocument.load("CreateXMLFil=
e=2Eas=AD=ADpx?strSearch=3D"
> > + strSearchTerm);
>
> > Setting the src property of document.getElementById("xmlDataIsland")
> > might work as well although I have not tried that.
>
> > --
>
> > Martin Honnen --- MVP XML
> > http://JavaScript.FAQTs.com/
>
> Thanks for that Martin. I have now altered the two sections of my
> JavaScript to appear as follows. The XXX alert appears, so I know that
> the handleHttpManualSearch() function is called, but the YYY alert
> does not appear. Could you please tell me what I have done
> incorrectly? I apologize for bothering you with this, but I have been
> trying for two days to get this to work trying every possible way that
> I could find. My lack of XML knowledge is embarrassing.
>
> document.getElementById("xmlDataIsland").XMLDocument.load("CreateXMLFile.=
as=ADpx");
> document.getElementById("xmlDataIsland").onreadystatechange =3D
> handleHttpManualSearch;
>
> function handleHttpManualSearch()
> {
> alert("XXX");
> if (document.getElementById("xmlDataIsland").readyState =3D=3D 4)
> {
> alert("YYY");
> var oNode =3D
> document.getElementById("xmlDataIsland").XMLDocument.getElementsByTagName=
('=ADborrower').item(0).firstChild.data;
> }
>
>
>
> }- Hide quoted text -
>
> - Show quoted text -- Hide quoted text -
>
> - Show quoted text -
I have managed to make the YYY alert appear by changing the code to if
(document.getElementById("xmlDataIsland").XMLDocument.readyState =3D=3D
4), and I can see the XML data within the data island by including the
following line.
alert(document.getElementById("xmlDataIsland").XMLDocument.xml);
How do I now refer to elements (or nodes) within the XML?
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
