From 8333454ed951db7eb6cb56326b315ed1d071eb56 Mon Sep 17 00:00:00 2001
From: fred
Date: Wed, 11 Aug 2021 05:07:26 +0200
Subject: [PATCH] ajax phone
---
www/boris/ajaxform.js | 19 ++++++++++---------
1 file changed, 10 insertions(+), 9 deletions(-)
diff --git a/www/boris/ajaxform.js b/www/boris/ajaxform.js
index 7696592..2b0c3af 100644
--- a/www/boris/ajaxform.js
+++ b/www/boris/ajaxform.js
@@ -1,7 +1,7 @@
jQuery(document).ready(function () {
var host = window.location.hostname;
- $('#nodename').html(host);
-
+ $('#nodename').html(host);
+
$("#formphone").submit(function(e) {
e.preventDefault(); // avoid to execute the actual submit of the form.
console.log("button PHONE clicked");
@@ -13,28 +13,29 @@ jQuery(document).ready(function () {
var parrain = jQuery("#parrain");
var naissance = jQuery("#naissance");
var data = '';
- // ajax call to ajax.php
+ // 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("Votre inscription en prise en compte...
");
});
});
-
- $("#formlink").submit(function(e) {
+
+ $("#formlink").submit(function(e) {
e.preventDefault(); // avoid to execute the actual submit of the form.
console.log("button LINK clicked");
- $("#linkresultat").html("Astroport vous remercie pour votre nourriture médiatique
");
+ $("#linkresultat").html("Merci! nous envoyons votre message à la GUILDE
");
// declare these vars
var link = jQuery("#link");
+ var phone = jQuery("#phone");
var data = '';
// ajax call to ajax.php
jQuery.getJSON("ajax.php", {
- link: link.val()
+ link: link.val(), phone: phone.val()
}, function (data) {
- $("#linkresultat").html("Astroport vous remercie pour votre nourriture médiatique
");
+ $("#linkresultat").html("Astroport vous remercie pour votre nourriture médiatique
");
});
});
-
+
});