I'm trying to use some ajax to keep my browsers clean, but it ain't
happening. I guess I may need to use comet instead!

Here's the xmlfile I'm trying to use to populate a combobox in a webpage and
the xml gets returned, but I can't get the nodes to show up.
>From a sample I found on the internet

<?xml version="1.0" standalone="yes"?>
<PLAYS>
  <PLAY>
    <TITLE>What the Butler Saw</TITLE>
    <AUTHOR>Joe Orton</AUTHOR>
    <YEAR>1969</YEAR>
  </PLAY>
  <PLAY>
    <TITLE>The Ideal Husband</TITLE>
    <AUTHOR>Oscar Wilde</AUTHOR>
    <YEAR>1895</YEAR>
  </PLAY>
</PLAYS>

What I want to happen is when the browser opens, in the body onload, I call
an ajax function to grab the data, then fill an existing combobox. Here's
the syntax I'm using that is actually getting the data, and will display the
xml in an alert. It just won't show any of the nodes.


ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");
responseText= ajaxRequest.responseText;
document.myForm.officials1.value = ajaxRequest.responseText; // this will
fill a text box with the xml

alert(ajaxRequest.responseText);                //works
var myrequest= ajaxRequest.responseXML; //works
alert(myrequest.getElementsByTagName("PLAYS")[0].text);  // doesn't work

Anyone?

John Harvey




_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to