Browse Source

update to send all data in body of http request

regarding the function of optional mail registering
master
alpcentaur 3 years ago
parent
commit
8d597637ac
1 changed files with 3 additions and 2 deletions
  1. +3
    -2
      docker/build/deb-rust-sncf/link.html

+ 3
- 2
docker/build/deb-rust-sncf/link.html View File

@ -33,11 +33,12 @@
btn2.addEventListener('click', function() { btn2.addEventListener('click', function() {
var email = document.getElementById("email").value; var email = document.getElementById("email").value;
var adtok = document.getElementById("link").value;
console.log(email); console.log(email);
/* var emailjsonstring = JSON.stringify(JSON.parse(document.getElementById('email'))); */ /* var emailjsonstring = JSON.stringify(JSON.parse(document.getElementById('email'))); */
var xhr1=new XMLHttpRequest(); var xhr1=new XMLHttpRequest();
xhr1.open("POST",'link/email', true); xhr1.open("POST",'link/email', true);
xhr1.send(email);
xhr1.send(email + ',' + adtok);
@ -77,7 +78,7 @@
<div id="email-register"> <div id="email-register">
<br /> <br />
<div class="c-flex"> <div class="c-flex">
<a id="email-register-btn" class="ncstyle-button margin-bottom" href="{{ config.sncf_url }}/admin/{{ admin_token }}">send link to mail</a>
<a id="email-register-btn" class="ncstyle-button margin-bottom" href="{{ config.sncf_url }}/admin/{{ admin_token }}">register via email</a>
</div> </div>
<br /> <br />
</div> </div>

Loading…
Cancel
Save