-
- 203 Posts
I’m able to use AJAX with prototype and retrieve some data. But now, how can I send many fields back from my PHP script? I could use a single string with some kind of separator, but i’ll have long strings to retrieve... Is there an easy way with prototype to parse an XML structure I would generate it manually in my PHP script.
Thanks in advance,
Blaise
Blaise Bernier
www.medialdesign.com - Solutions for small business, hosting, design and more!
Nice discussion of the topic here:
http://www.quirksmode.org/blog/archives/2005/12/the_ajax_respon.html
And an XML-handling library here:
http://karaszewski.com/tools/ajaxlib/
And the definitive Prototype discussion at
http://www.sergiopereira.com/articles/prototype.js.html has this interesting bit of code:
<script>
function getXmlNodeValue(xmlNode){
return Try.these(
function() {return xmlNode.text;},
function() {return xmlNode.textContent;)
);
}
</script>
Google is your friend!