buenas. hay proyecto k ya esta desarrollado y colocaron librerias de prototype. implemente un jquery para un formulario de login. pero cuando le doy a un vinculo para k me muestre el formulario login, de ja de funcionar.
he colocaldo el metodo jQuery.noConflict(); para evitar problemas de esas 2 librerias.pero aun asi no funciona ljqueyr con ajax.
me pueden orientar en ello por favor ?.
Código HTML:
Ver original<script src="js/prototype1600.js" language="JavaScript" type="text/javascript"></script> <script src="js/scriptaculous/scriptaculous.js?load=effects,builder" type="text/javascript"></script> <script src="js/alt.js" language="JavaScript" type="text/javascript"></script> <script src="js/preview_templates.js" language="JavaScript" type="text/javascript"></script> <script src="js/loader.js" language="JavaScript" type="text/javascript"></script> <script language="JavaScript" type="text/javascript"><!-- Event.observe(window, 'load', function() {
initAlts();
});
// -->
<script type="text/javascript" src="js/jquery-1.4.2.min.js"></script> jQuery.noConflict();
el jquery ajax.
Código Javascript
:
Ver originalfunction login(){
$.ajax({
url: "login.php",
type: "GET",
beforeSend: function(){$("#customer_login").hide("fast");}, //show loading just when link is clicked
complete: function(){ $("#customer_login").show("fast");}, //stop showing loading when the process is complete
success: function(datos){
$("#customer_login").show("slow"); //animation
$("#customer_login").html(datos);
}
});
}
function validar_login(){
var username = document.getElementById('username').value;
var password = document.getElementById('password').value;
$.ajax({
contentType: "application/x-www-form-urlencoded",
url: "validar.php",
type: "POST",
data: "submit=&username="+username+"&password="+password,
beforeSend: function(){$("#customer_login").hide("fast");}, //show loading just when link is clicked
complete: function(){ $("#customer_login").show("fast");}, //stop showing loading when the process is complete
success: function(datos){
$("#customer_login").show("slow"); //animation
$("#customer_login").html(datos);
}
});
}