Append as <option></option> to <select id="#test"></select> using Jquery from JSON encoded array.
I thought If this help you guys. You can use this to Add <option></option> on the fly using Ajax.
$(document).ready( function() {
var i;
var myData = jQuery.parseJSON(data);
for (i=0; i < myData.length; i ++ )
{
$('#test').append($('<option>', {value: i,text: myData[i].orgName}));
}
});
No comments:
Post a Comment