Hi
when a page loads i would like to populate a drop down field from the results from a ajax call
i have added this to Startup script
customer= ‘SystemTEN’;
$.ajax({
url: ‘getUserList.php’,
type: ‘POST’,
data: {customer: customer},
success:function(result)
{
var options;
var data = JSON.parse(result);
$(“#x_customeruserid”).val(result);
}
});
it is returning the results just not sure how to populate the dropdown field
can anyone help me out
half working with this, but on save it does not write the x_customeruserid value into the database
success:function(result)
{
var options;
var data = JSON.parse(result);
var JSONObject = JSON.parse(result);
newOptionsSelect = ‘’;
for (var key in JSONObject) {
if (JSONObject.hasOwnProperty(key)) {
var newOptionsSelect = newOptionsSelect + ‘’+JSONObject[key]+‘’;
}
}
$(‘#x_customeruserid’).append( newOptionsSelect );
}