This is regarding a Google Chrome Extension which I am trying to build.
I currently have 2 files. One JS file and one HTMl file.
I want to use the JS variable in my HTML file. But I'm using the "mailto" functionality in my HTMl file. So when someone clicks on the image in the HTML file, it will automatically open the email client for the user and auto-populate the "to", "subject" and the "body" fields.
So, I have one variable in my JS file and I want the value of that variable to attached in the body section of the email inbox.
So, my question is how do I do that?
So here's my JS file -
var all_details = "Core = " + core + "\n" + "Workspace GUID = " + workspaceId + "\n" + "Model GUID = " + modelId;
console.log(all_details);
// So here, I want all the data from the "all_details" variable in my HTML mailto body field.
Here's my HTML code -
<a id= "insert" href="mailto:abc@google.com?subject=Issue &body=${all_details}" target="_blank"><img border="0" src="support.png" width="50" height="50" title="Have questions?"></a>
<h3>Contact Us</h3>
So, I want that when I click on the above image (which is fetched from the HTML src), it should open an email inbox (it does open now).
I just want the contents/data from the "all-details" variable from my JS to be pasted in the body section of the email inbox.