I don't know whether the line wraps you have are hard wraps or not - beware
that you can't run a string across multiple lines in JS.

Otherwise this looks fine on the face of it, although I'm not familiar with
the validation plugin so couldn't be sure that you've configured that
correctly.

Where is it breaking? Are you getting any javascript errors? Have you tried
debugging in Firefox?

--rob


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") }
            });
        }
    });




--
Rob Desbois
Eml: [EMAIL PROTECTED]
Tel: 01452 760631
Mob: 07946 705987
"There's a whale there's a whale there's a whale fish" he cried, and the
whale was in full view.
...Then ooh welcome. Ahhh. Ooh mug welcome.

Reply via email to