brucegonewild
Programmer
hey there,
So I have this javascript function that does an Ajax call to get a bunch of data... this part is fine...
I get the following (from my ajax-responseText), and I thought I could simply populate my drop-down by setting its innerHtml (or innerText) to responseText... no luck.
here's what I have:
my drop down definition:
After an event, I get the following text and I want to populate my drop down with it:
How do I make it (in my javascript) so, the drop-down contains the above <asp:listItems>s?
cheers!
So I have this javascript function that does an Ajax call to get a bunch of data... this part is fine...
I get the following (from my ajax-responseText), and I thought I could simply populate my drop-down by setting its innerHtml (or innerText) to responseText... no luck.
here's what I have:
my drop down definition:
Code:
<asp:DropDownList ID='ddlFromToList' runat='Server' Width='227px'>
</asp:DropDownList>
After an event, I get the following text and I want to populate my drop down with it:
Code:
<asp:ListItem value='1' Text='text1'></asp:ListItem>
<asp:ListItem value='2' Text='text2'></asp:ListItem>
<asp:ListItem value='3' Text='text3'></asp:ListItem>
How do I make it (in my javascript) so, the drop-down contains the above <asp:listItems>s?
cheers!