Copy link to clipboard
Copied
Hi experts,
I am facing issue while binding retrieved data through AJAX in select-list box. I am unable to do so. Please suggest where to do changes in my code.
This is my ajax code:
$('body').on('change','#port_code', function() { //1st list box on change this will execute to update records in 2nd list box.
var selected_port = document.getElementById("port_code").value; //1st list box selected value
if (selected_port != "")
{
var formData = "selected_port_code="+selected_port+"&reload=true";
$.ajax({
url: 'index.cfm?action=vehicle.getGateNo',
type: 'POST',
data: formData,
success: function(data, textStatus, jqXHR){
console.log(data);
$.each (data, function(k, v){
vx='<option value="'+v.GATE_NO+'">'+v.GATE_DESC+'</option>';
});
$('#gate_no').html(vx); //2nd Select-List box where binding data
}
}); //AJAX End
}
}); //Function End
Getting record in console.log(data):
{"COLUMNS":["GATE_NO","GATE_DESC","ACTIVE","CREATED_BY","CREATED_DATE","MAIN_GATE","PORT_CODE","SR_NO"]
,"DATA":
[["1","MAIN GATE/OFFSHORE DIBBA","Y","ADMIN","December, 21 2022 00:00:00","Y","POD",1],["2","GATE 2","Y","ADMIN","March, 01 2023 10:20:30",null,"POD",5]]}
Copy link to clipboard
Copied
i assume this is an acrobat question. otherwise, clarify.
========================================
in the future, to find the best place to post your message, use the list here, https://community.adobe.com/
p.s. i don't think the adobe website, and forums in particular, are easy to navigate, so don't spend a lot of time searching that forum list. do your best and we'll move the post if it helps you get responses.
<moved from using the community>
Copy link to clipboard
Copied
Copy link to clipboard
Copied
please post in the correct forum. this is not your first time using the adobe forums and your issues seem cold fusion related. this thread is now in the cold fusion forum. you may want to bookmark this forum for future use.
<moved from acrobat>
Copy link to clipboard
Copied
Looks like a script for web browsers.