Sorry, in my earlier post I got a little confused with the bind/unbind
semantics.

This code should be better:

function save_data() {
    var bound_form = $(this);
    $.post("/save_data.php", { name: "opt-in name", email: "opt-in
email" }, function() {
        bound_form.unbind("submit", save_data).submit();
    });
}

$("#form1").bind("submit", save_data);

Reply via email to