i have a webpage that gets data from a local database. i can retrieve the data to be displayed but for some reason a certain value (value of '#item_name') does not display. it's supposed to be the text inside a select dropdown with an id of item_name. am i missing something? here is my code:
$.ajax({
url: '/get_items',
method: 'POST',
data: { item_id: item_id },
success: function (response) {
alert(JSON.stringify(response.result[0].name));
$('#hidden_item_item_id').val(response.result[0].id);
$('#item_name').val(response.result[0].name);
$('#item_remarks').val(response.result[0].remarks);
$('#updateItemsModal').modal('show');
}
});