Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

431
Views
How to get ajax response values from different ajax request response? or any other way?

I have a form having dependent drop down list like brands, category and product and for single row I am having all 3 list from 3 ajax request response but in new row using addrow how I can call or get 3 different ajax response value under one?

for example based on brand category comes like

$.ajax({
        url: 'php_action/fetchDropdownProductData.php',  // category depend on brand name
        type: 'post',
        data: {brandId : brandId},
        dataType: 'json',
        success:function(response) {
            var html = '<option value="">Select Category</option>';
            response.forEach(category => {
                 html += "<option value='" + category.categories_id + "'>"+ category.categories_name +"</option>"
                 $("#productCategories"+row).html(html);
            })
        } // /success
    }); // /ajax function to fetch the product data

and for addrow ajax

$.ajax({
        url: 'php_action/fetchProductData.php',
        type: 'post',
        dataType: 'json',
        success:function(response) {
            $("#addRowBtn").button("reset");            

            var tr = '<tr id="row'+count+'" class="'+arrayNumber+'">'+
                 // start of productBands on addrows                
                '<td>'+
                    '<div class="form-group">'+
                     // here is the wrong I am doing...
                    '<select class="form-control" name="productBrand[]" id="productBrand'+count+'" onchange="getProductData1('+count+')" >'+
                        '<option value="">~~SELECT~~</option>';

            $.each(response, function(index, value) {
                tr += '<option value="'+value[0]+'">'+value[1]+'</option>';                         
            });
                                                    
            tr += '</select>'+
                '</div>'+
            '</td>'+
over 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!