Hi,
I have php page, 2.php, which collects the data and dispalys it from previous page , 1.php.
In 2.php, I also have html and javaScript, which contains a button, and cerresponding onclick script, which opens the OUTLOOk to send the E-mail with given sendername and subject.
But for body part of the mail, I want to fetch the details displayed in 2.php and print it using JavScript.
//My <script>
<script type = "text/javascript" src = "script/mail.js"></script>
<script type="text/javascript">
$(function () {
$('.btnSendEmail').click(function (event) {
var email = 'senderemail@email.com';
var subject = 'Hello!!';
var emailBody = 'need to fetch the data and print it here';
window.location = 'mailto:' + email + '?subject=' + subject + '&body=' + emailBody;
});
});
</script>