I have an array of input-fields and via an ajax-call I receive values which I want to put in the array:
<input id="startdateinput[0]" type="text" value="2014-01-01">
<input id="startdateinput[1]" type="text" value="">
<input id="startdateinput[2]" type="text" value="">
The XML looks something like:
<item key='0'>
<startdate>2014-01-01</startdate>
</item>
<item key='1'>
<startdate>2014-02-01</startdate>
</item
I use jQuery something like:
$(xml).find('item').each(function(){
startdate=$(this).find('startdate').text();
key=$(this).attr('key');
$("#startdate["+key+"]").attr("value",startdate);
});
Nothing happens....