forked from axiom-team/astroport
40 lines
1.6 KiB
JavaScript
40 lines
1.6 KiB
JavaScript
jQuery(document).ready(function () {
|
|
var host = window.location.hostname;
|
|
$('#nodename').html(host);
|
|
|
|
$("#formphone").submit(function(e) {
|
|
e.preventDefault(); // avoid to execute the actual submit of the form.
|
|
console.log("button PHONE clicked");
|
|
$("#phoneresultat").html("<p><h3>Vous allez recevoir un SMS<h3>" +
|
|
"<h5>Utilisez les identifiant reçus dans Cesium et Gchange pour activer votre clef...</h5></p>");
|
|
// declare these vars
|
|
var phone = jQuery("#phone");
|
|
var parrain = jQuery("#parrain");
|
|
var naissance = jQuery("#naissance");
|
|
var data = '';
|
|
// ajax call to ajax.php
|
|
jQuery.getJSON("http://"+host+":10099/sms_loveland.php", {
|
|
phone: phone.val(), parrain: parrain.val(), naissance: naissance.val()
|
|
}, function (data) {
|
|
$("#phoneresultat").html("<p>Votre inscription en prise en compte...</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>");
|
|
});
|
|
});
|
|
|
|
|
|
});
|