Ver Mensaje Individual
  #2 (permalink)  
Antiguo 07/02/2010, 14:37
Avatar de mayid
mayid
Colaborador
 
Fecha de Ingreso: marzo-2009
Ubicación: BsAs
Mensajes: 4.014
Antigüedad: 15 años, 1 mes
Puntos: 101
Respuesta: Cargar datos via ajax/jquery según dato.

Yo utilizo un plugin para manejar formularios ajax. Es simple. Ej:

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

$('#myForm').ajaxForm(function(respuesta) {
alert("funcionó! La respuesta es:"+respuesta);
});
En cuanto a tu funcion, no anda porque no estas pasando valores a PHP (.load sirve para recibir). Yo la vería así:
Cita:
$('#button').click(function() {

$.ajax({
type: "POST",
url: "carga_socio.php",
success: function(respuesta) {

$('#resultado').html(respuesta);

}
});
return false;

})
Usando POST o GET segun conveniencia.

nota: quizas con .load puedas pasar variables GET encadenandolas con ?