32 lines
616 B
JavaScript
32 lines
616 B
JavaScript
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$("#submit_send_email").on("click",function(e){
|
|
e.preventDefault();
|
|
|
|
console.log("hello");
|
|
|
|
const value = $("#data_input_textarea").val().trim();
|
|
let json = JSON.parse(value);
|
|
console.log(json);
|
|
|
|
if(value==""){alert("Please add text");return;}
|
|
$("#data_output_textarea").val("");
|
|
$.post("request.php",{
|
|
"send_email": true,
|
|
"data": value
|
|
},function(resp){
|
|
resp = JSON.parse(resp);
|
|
console.log(resp);
|
|
// $("#data_output_textarea").val(JSON.stringify(resp.data));
|
|
});
|
|
|
|
});
|
|
// https://jsoneditoronline.org/#left=local.pewama
|
|
|
|
|