Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

facing issue while binding retrieved data through AJAX in select-list box

Explorer ,
Jun 06, 2023 Jun 06, 2023

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]]}

203
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 06, 2023 Jun 06, 2023

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>

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jun 06, 2023 Jun 06, 2023
This us related to coldfusion
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 06, 2023 Jun 06, 2023
LATEST

@Faizan278243197lsr 

 

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>

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 06, 2023 Jun 06, 2023

Looks like a script for web browsers.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources