javascript – Why does my website have a JQuery AJAX error , and there are no response headers? – Education Career Blog

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.

,

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

Leave a Comment