As an aside: If you're using firebug (on  firefox) - try
console.log('test'); it will appear in the console and not interrupt
the script. Not that that would affect any other errors you might
have..

I'd greatly encourage you to install this if you haven't

On 6/28/07, "Sebastián V. Würtz" <[EMAIL PROTECTED]> wrote:

    What is bad in this? i want a simple alert() but dont work, check
the lastest lines

    var loader = jQuery('<div id="black_overlay"><div
id="loading_comments"><img src="assets/i.loading_big.gif" alt="Espere
por favor..." /><p>Cargando, espere por favor</p></div></div>')
        .hide()
        .appendTo("body");
    jQuery().ajaxStart(function() {
            loader.show();
        })
        .ajaxStop(function() {
            loader.hide();
        });


        var v = jQuery("#envio_comentarios_form").validate({
            errorLabelContainer: $("#mensajes_envio"),
            wrapper: "li",
            event: "keyup",
        rules: {
            nombre: {
            required: true,
            minLength: 4,
            maxLength: 30
            },
            acepto_comentario: {
                required: true
            },
            email: {
            email: true,
            required: true,
            minLength: 10,
            maxLength: 25
            },
            comentario: {
            required: true,
            minLength: 30,
            maxLength: 300
            }
        },
        messages: {
            comentario: {
            required: "Es necesario que deje un comentario",
            minLength: "Su comentario es muy corto (mínimo 30
letras).",
            maxLength: "Su comentario es muy largo (máximo 300
letras)."
            },
            nombre: {
            required: "Es necesario que complete su nombre",
            minLength: "Nombre muy corto",
            maxLength: "Nombre muy largo."
            },
            email: {
            email: "Ingrese una dirección válida de email",
            required: "Es necesario que complete su email",
            minLength: "Dirección muy corta",
            maxLength: "Dirección muy larga."
            },
            acepto_comentario: {
            required: "Debe aceptar nuestras cláusulas sobre
comentarios"
            }
        },
        submitHandler: function(form) {
            jQuery(form).ajaxSubmit({
                resetForm: true,
                dataType: "json",
                    success:  function() {alert("test") }
            });
        }
    });



--
Daniel Eastwell

Portfolio and articles:
http://www.thoughtballoon.co.uk

Blog:
http://www.thoughtballoon.co.uk/blog

Reply via email to