RE: [NF] HOWTO:Any ajax gurus out there?
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 What the Butler Saw Joe Orton 1969 The Ideal Husband Oscar Wilde 1895 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: ProFox@leafe.com 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.
Re: [NF] HOWTO:Any ajax gurus out there?
On 12/26/06, john harvey <[EMAIL PROTECTED]> wrote: > alert(myrequest.getElementsByTagName("PLAYS")[0].text); // doesn't work try dropping the S and get Elements By Tag Name PLAY -- Ted Roche Ted Roche & Associates, LLC http://www.tedroche.com ___ Post Messages to: ProFox@leafe.com 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.
RE: [NF] HOWTO:Any ajax gurus out there?
Thanks, I finally got it worked out. I also had to change the response.header content type to application/xml. John -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ted Roche Sent: Tuesday, December 26, 2006 9:24 PM To: profox@leafe.com Subject: Re: [NF] HOWTO:Any ajax gurus out there? On 12/26/06, john harvey <[EMAIL PROTECTED]> wrote: > alert(myrequest.getElementsByTagName("PLAYS")[0].text); // doesn't work try dropping the S and get Elements By Tag Name PLAY -- Ted Roche Ted Roche & Associates, LLC http://www.tedroche.com [excessive quoting removed by server] ___ Post Messages to: ProFox@leafe.com 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.