i need help because i want the stuff that i(someone) put inserted to the div “orderinfo” to be read and sent with emailjs with the mail
i need help
html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Good Food</title>
<link rel="stylesheet" href="styl.css">
<link rel="script" href="zamow.js">
<script type="text/javascript"
src="https://cdn.jsdelivr.net/npm/@emailjs/browser@3/dist/email.min.js">
</script>
<script type="text/javascript">
(function(){
emailjs.init("k4PLn-odXcBlho7D8");
})();
</script>
<script type="text/javascript"
src="https://cdn.jsdelivr.net/npm/@emailjs/browser@3/dist/email.min.js">
</script>
<script type="text/javascript">
(function () {
emailjs.init("k4PLn-odXcBlho7D8");
})();
</script>
<script>
var templateParams = {
from_name: 'order',
message: 'details'
};
emailjs.send('service_1kb880o', 'template_hrbsaqs', templateParams)
.then(function (response) {
console.log('SUCCESS!', response.status, response.text);
}, function (error) {
console.log('FAILED...', error);
});
</script>
</head>
<body>
<div class="gora">
<div class="logo"><img class="logoinazwa" src="img/burger-line-64 (1).webp" alt="burger logo"></div>
<div class="nazwa">Good Food <br> Best Catering</div>
<div class="ordercontainer">
<div class="orderinfo" contenteditable="true">
<p class="p">Addres line 1</p>
</div>
<div class="orderinfo" contenteditable="true">
<p class="p">Addres line 2</p>
</div>
<div class="orderinfo" contenteditable="true">
<p class="p">What time do you wish your food to be delivered?</p>
</div>
<div class="orderinfo" contenteditable="true">
<p class="p">Additional requests</p>
</div>
<div class="button2"><p class="p2">Order Now</p> </div>
</div>
</div>
</body>
<footer class="footer"> Contact <br> Phone number +48 123 123 132 <br> E-mail [email protected] <br> Secondary e-mail [email protected]</footer>
</html>
javascript
var templateParams = {
name: 'order',
notes: 'next delivery'
};
emailjs.send('service_1kb880o', 'template_hrbsaqs', templateParams)
.then(function (response) {
console.log('SUCCESS!', response.status, response.text);
}, function (error) {
console.log('FAILED...', error);
});
var orderinf = document.getElementsByClassName("orderinfo").addEventListener("click", displayDate);
element.addEventListener("click", function(){
var templateParams = {
name: 'order',
notes: 'details'
};
emailjs.send('service_1kb880o', 'template_hrbsaqs', templateParams ,)
.then(function (response) {
console.log('SUCCESS!', response.status, response.text);
}, function (error) {
console.log('FAILED...', error);
});
var text=document.getElementsByClassName("orderinfo")
print(text)
; });
im expecting it to read the div and send its content with the mail
I NEED HELP
(i know my code is messed up its my 2nd month of learning)
[ITS IN EMAILJS]