views:

23

answers:

1

When I click on "Request and Invite", you'll notice that there's a JQuery error...but it's weird.

http://bit.ly/cuq5KV

The code is pretty simple. The error seems to be happening on JQuery's file. I tried previous versions of JQuery (both compressed and uncompressed), but there were always problems.

+2  A: 

Make sure you return false from the form submit handler or the ajax call won't have time to execute:

$('#waitlist_form').submit(function() {
    var the_email = $('#waitlist_box').val();
    $.ajax({
        type: 'POST',
        url: '/waitlist/submit',
        data: { email: the_email },
        beforeSend: function() {
        },
        success: function(html) {
            $('#waitlist_button').html('Thanks!');
        }
    });
    return false;
});
Darin Dimitrov
Thank you. Forgot my javascript basics, holy cow!!!
TIMEX