jquery $.post

Events happening in the community are now at Drupal community events on www.drupal.org.
argol_0's picture

¿Como mandar por $.post a un archivo php?

Teniendo lo siguiente:
//carga.js

(function ($) {
$(document).ready(function(){

    $("#velocidad").change(function(){
    $.post("carga.php",{ velocidad:$(this).val(),llanta:$("#llanta").val(),serie:$("#serie").val(),ancho:$("#ancho").val()},
    function(data){$("#carga").html(data);
    })
});

})
})(jQuery);

//php en un bloque
<select id="velocidad" name="velocidad"><option>V</option>
</select>
<select id="carga" name="carga"><option>91</option>
</select>

Código para cargar dinamicamente un selector.

Read more
argol_0's picture

¿Como mandar por $.post a un archivo php?

Teniendo lo siguiente:
//carga.js

(function ($) {
$(document).ready(function(){

$("#velocidad").change(function(){
$.post("carga.php",{ velocidad:$(this).val(),llanta:$("#llanta").val(),serie:$("#serie").val(),ancho:$("#ancho").val()},
function(data){$("#carga").html(data);
})
});

})
})(jQuery);

//php en un bloque
<select id="velocidad" name="velocidad"><option>V</option>
</select>
<select id="carga" name="carga"><option>91</option>
</select>

Código para cargar dinamicamente un selector.

Read more
Subscribe with RSS Syndicate content