Is it possible to insert option tags in a select tag from ajax html

Doc1956

New Member
I have a url which returns a bunch of options tags. Can I stick that in my $.ajax success: \[code\]function(html) {} \[/code\]Can I push all the option tags directly inside my select tag after emptying my select tag.my select tag has a name of "SelectName".
I was thinking something like so:\[code\]$("select[name='selectName']").appendTo($(html)); // but this doesn't work\[/code\]my html looks like this (its nothing but option tags and it comes from a url options.apsx:\[code\]<option id="1">test1</option><option id="2">test2</option>...\[/code\]
 
Top