astroport/www/LOVELand/ajaxform.js

36 lines
1.3 KiB
JavaScript
Raw Normal View History

2020-04-14 02:26:37 +02:00
jQuery(document).ready(function () {
$("#formphone").submit(function(e) {
e.preventDefault(); // avoid to execute the actual submit of the form.
console.log("button PHONE clicked");
2020-05-04 02:10:46 +02:00
$("#phoneresultat").html("<p><h3>Vous allez recevoir un SMS...<h3>" +
"<h5>Suivez ses instructions pour finaliser votre inscription.</h5></p>");
2020-04-14 02:26:37 +02:00
// declare these vars
var phone = jQuery("#phone");
var data = '';
// ajax call to ajax.php
2020-05-13 13:03:56 +02:00
jQuery.getJSON("zen_loveland_entrance.php", {
2020-04-14 02:26:37 +02:00
phone: phone.val()
}, function (data) {
2020-05-13 13:03:56 +02:00
$("#phoneresultat").html("<p>Votre inscription en prise en compte...</p>");
2020-04-14 02:26:37 +02:00
});
});
$("#formemail").submit(function(e) {
e.preventDefault(); // avoid to execute the actual submit of the form.
console.log("button EMAIL clicked");
$("#emailresultat").html("<p><h3>MERCI, vous allez recevoir plus de détails dans votre boite Email</h3></p>");
// declare these vars
var email = jQuery("#email");
var data = '';
// ajax call to ajax.php
jQuery.getJSON("ajax.php", {
email: email.val()
}, function (data) {
$("#emailresultat").html("<p>MERCI, Nous vous envoyons le détail de l'offre Made In Zion / Bank par Email</p>");
});
});
2020-05-04 02:10:46 +02:00
});