Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

427
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda