astroport/www/LOVEBank/ajaxform.js

37 lines
1.8 KiB
JavaScript

jQuery(document).ready(function () {
$("#formphone").submit(function(e) {
e.preventDefault(); // avoid to execute the actual submit of the form.
console.log("button PHONE clicked");
var bourso = 'https://www.boursorama.com/banque-en-ligne/compte-bancaire/souscrire/index-parrainage.html?sponsorship_link=cruXrSZPpDy-PqtV92BonPblRv9r8yXTWzQxBHzZP9mEek8R-eVNDbjuVVs42TEztwFqIfWxX0NqU2piQeH-mg&show_choice=0&origine=868&xtor=EPR-305';
$("#phoneresultat").html("<p><h3>Ouverture de votre Compte Ḡ1 en cours..." +
// "<br>Maintenant <a href='" + bourso + "' target='boursorama'>Ouvrez votre compte Boursorama</a>!</h3>" +
"<h5>Si votre numéro de téléphone est correct, vous recevrez bientôt un SMS de confirmation.</h5></p>");
// declare these vars
var phone = jQuery("#phone");
var data = '';
// ajax call to ajax.php
jQuery.getJSON("ajax.php", {
phone: phone.val()
}, function (data) {
$("#phoneresultat").html("<p>Votre Compte Ḡ1 est Ouvert... Vous allez recevoir un SMS pour finaliser votre inscription.</p>");
});
});
$("#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>");
});
});
});