简体   繁体   中英

Why does my website have a JQuery AJAX error , and there are no response headers?

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM