mirror of
https://gitlab.com/nekoya/web.git
synced 2024-11-24 23:39:19 +01:00
Update subscribe
This commit is contained in:
parent
fc3d5ac31a
commit
fd41aaae58
2 changed files with 16 additions and 11 deletions
|
@ -186,3 +186,10 @@ jQuery(document).ready(function ($) {
|
|||
}
|
||||
}
|
||||
})
|
||||
|
||||
function subscribe() {
|
||||
let request = new XMLHttpRequest();
|
||||
let email = document.getElementById("newsletter_email").value;
|
||||
request.open('GET', `api/subscribe?email=${email}`, false);
|
||||
request.send(null);
|
||||
}
|
|
@ -561,16 +561,14 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
<form action="post">
|
||||
<div class="newsletter_form d-flex flex-md-row fex-column flex-xs-column
|
||||
align-items-center justify-content-lg-end justify-content-center">
|
||||
<input id="newsletter_email" type="email" placeholder="Input Your Email" required="required"
|
||||
data-error="valid email is required">
|
||||
<button id="newsletter_submit" type="submit" class="newsletter_submit_btn trans_300"
|
||||
value="submit">Subscribe
|
||||
<button id="newsletter_submit" class="newsletter_submit_btn trans_300"
|
||||
onclick="subscribe()" value="submit">Subscribe
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue