> Hello, I've been trying to submit a Form to a php file to send an email.


Hi Gaston,

You've got a few things going on there:

1. use $.ajax instead of $(...).ajax
2. remove the semicolons from the ajax options object
3. it's better to bind the submit event rather than a click event
4. you could/should add the method and action params to your form element

See if this works:

$(document).ready(function(){
    $("#videos").submit(function(){
        var params = $("[EMAIL PROTECTED]").serialize();
        $.ajax({
            type:"POST",
            url:"sendmails.php",
            data:params,
            success:function(msg){
                alert("sent ok! "+ msg);
            }
        });
    });
});

_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

Reply via email to