I've looked everywhere for a solution to this and hacked around with it all
day with no luck.

How do we populate a select box using xml data obtained from an ajax
request.

If what I get back from the fillin example is this:
<data>
<first>Jack</first>
<last>Flash</last>
<email>[email protected]</email>
</data>

And I want to add a list of US states to a select box but obviously we can't
have

<state>AK</state>
<state>AL</state>

So question 1 is: What's the correct format for the XML response?

My 2nd question is how do I break out the seperate parts from the transport
response?
transport.responseXML.getElementsByTagName('$fieldname')[0].firstChild.nodeValue;

 My 3rd question is, will the following code work for populating the select
box?
                opt.text = "Alaska";
                opt.value = AK;
                $("DropDownStateList").options.add(opt);        // Assign
text and value to Option object

-- 
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.

Reply via email to