Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8066007
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T11:50:52+00:00 2026-06-05T11:50:52+00:00

I have a form where people can book seats for a given event. It’s

  • 0

I have a form where people can book seats for a given event.
It’s actually a WordPress plugin.
When someone sends his booking, email notifications are sent properly and the event booking status is updated accordingly.
The issue is that the booking form does not give any feedback whatsoever.
Once you hit “book now”, the graphic keeps loading and no feedback is ever displayed like for instance “booking sent successfully” or “there are errors in your form”, even though the booking is saved correctly with both sides notified by email.
I guess it’s a JavaScript issue,Firebug console is not showing any error…
So here is the code source of the booking form :

$('#em-booking-form').submit( function(e){
e.preventDefault();
var em_booking_doing_ajax = false;
$.ajax({
    url: EM.bookingajaxurl,
    data:$('#em-booking-form').serializeArray(),
    dataType: 'jsonp',
    type:'post',
    beforeSend: function(formData, jqForm, options) {
        if(em_booking_doing_ajax){
            alert(EM.bookingInProgress);
            return false;
        }
        em_booking_doing_ajax = true;
        $('.em-booking-message').remove();
        $('#em-booking').append('<div id="em-loading"></div>');
    },
    success : function(response, statusText, xhr, $form) {
        $('#em-loading').remove();
        $('.em-booking-message').remove();
        $('.em-booking-message').remove();
        //show error or success message
        if(response.result){
            $('<div class="em-booking-message-success em-booking-message">'+response.message+'</div>').insertBefore('#em-booking-form');
            $('#em-booking-form').hide();
            $('.em-booking-login').hide();
            $(document).trigger('em_booking_success', [response]);
        }else{
            if( response.errors != null ){
                if( $.isArray(response.errors) && response.errors.length > 0 ){
                    var error_msg;
                    response.errors.each(function(i, el){ 
                        error_msg = error_msg + el;
                    });
                    $('<div class="em-booking-message-error em-booking-message">'+error_msg.errors+'</div>').insertBefore('#em-booking-form');
                }else{
                    $('<div class="em-booking-message-error em-booking-message">'+response.errors+'</div>').insertBefore('#em-booking-form');                           
                }
            }else{
                $('<div class="em-booking-message-error em-booking-message">'+response.message+'</div>').insertBefore('#em-booking-form');
            }
        }
        $('html, body').animate({ scrollTop: $("#em-booking").first().offset().top - 50 }); //sends user back to top of form
        //run extra actions after showing the message here
        if( response.gateway != null ){
            $(document).trigger('em_booking_gateway_add_'+response.gateway, [response]);
        }
        if( !response.result && typeof Recaptcha != 'undefined'){
            Recaptcha.reload();
        }
    },
    complete : function(){
        em_booking_doing_ajax = false;
        $('#em-loading').remove();
    }
});
return false;   
});
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T11:50:53+00:00Added an answer on June 5, 2026 at 11:50 am

    Your form seems to work better if you set the datatype to json instead of jsonp.

    Typically you would employ jsonp when you need to make a AJAX query to another domain, which you aren’t doing in this instance.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Let's say I have a form where users can search for people whose name
I have a simple form where a user can add, edit, and delete people
I have a contact page (contact.php) that sends a form (formsend.php) when people fill
I have a form that people can use to send emails to our clients.
I have a website that people can book courses and workshops on. They can
I have a form that people can add their stuff. However, in that form,
I have a contact form on my website so people can write testimonials. The
I have a form in which people can enter file paths. I want to
I have a form view which people use to update a record in the
I have a form with a list of people with check boxes next to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.