Ver Mensaje Individual
  #3 (permalink)  
Antiguo 24/04/2009, 21:45
lviera86
 
Fecha de Ingreso: abril-2008
Mensajes: 17
Antigüedad: 16 años, 1 mes
Puntos: 0
Respuesta: Problema con funcion ajax usando jquery

bueno me toca responderme yo mismo, ya que resolvi de algunamaenra el problema, resolvi definiendo funciones por ejemplo:

$("#validarRepresentante").click(function(){
$.ajax({
type: "GET",
url:"ajax.php",
data: "opt=verificarRepresentante&cedulaR="+$("#cedulaR" ).val(),
contentType: "application/x-www-form-urlencoded",
dataType: "html",
beforeSend: function(objeto){
$("#panelRepresentante").html(Cargar("Cargando..." ));
},
success: function(datos){
$("#panelRepresentante").html(datos);
}
});
});


lo cambie por esto:

function buscar(){
$.ajax({
type: "GET",
url:"ajax.php",
data: "opt=verificarRepresentante&cedulaR="+$("#cedulaR" ).val(),
contentType: "application/x-www-form-urlencoded",
dataType: "html",
beforeSend: function(objeto){
$("#panelRepresentante").html(Cargar("Cargando..." ));
},
success: function(datos){
$("#panelRepresentante").html(datos);
}
});
}

y en el


#validarRepresentante osea en el input en el evento onclick = "javascript: buscar()"

:) bueno me page y me di el vuelto, pero no fue facil. je

esto con jquery ^^ :s xd