Javascript files and ajax form

More
10 years 10 months ago #4529 by vinikey
Javascript files and ajax form was created by vinikey
Hello!

I'm trying to change the look of the current template in checkout process.
After some modifications I notice that the "Next"button at the first tab ( Room & Rates ) doesn't send the data of the form via ajax.
It just submit the page and returns a blank page with a json data like that
{"status":1,"message":"","next_step":"guestinfo"}
Could you please help me on where you set the js on this button, in order to find what I'm doing wrong?

Thank you!

Please Log in or Create an account to join the conversation.

More
10 years 10 months ago #4530 by vietvh
Replied by vietvh on topic Javascript files and ajax form
Hi,

With a Chrome Develop Toolbar - Console, you can click on the AJAX request to see the "Form Data" section which contains all submitted form data.

Could you let us know more about what kind of modification you are going to make so that we can support you better?

Regards,

Please Log in or Create an account to join the conversation.

More
10 years 10 months ago - 10 years 2 months ago #4531 by vinikey
Replied by vinikey on topic Javascript files and ajax form
Hi Vietvh!

I'm interesting more where you have the javascript which make the button to act as an ajax button.
When I click on the button, the browser posts the form and changes page.
This is the reason I want the post javascript.

You can get a sample what I mean here ...

As you can see, if you select the quantity of the rooms and fill in the necessary fields, the next button post the entire page.

Thank you for your support!
Last edit: 10 years 2 months ago by vinikey.

Please Log in or Create an account to join the conversation.

More
10 years 10 months ago #4533 by vietvh
Replied by vietvh on topic Javascript files and ajax form
Hi,

There is something wrong with your site because the AJAX functionality doesn't work there. Could you switch to the default Joomla template (Protostar) to see if this issue persists?

You can check this file code/media/com_solidres/assets/js/site.js for the code of submit button:
var submitReservationForm = function(form) {
...
}

Regards,

Please Log in or Create an account to join the conversation.

Moderators: solidres
Powered by Kunena Forum

All the things you need to make your work easier. Did you like Solidres?