Warning

 

Close
Confirm Action

Are you sure you wish to do this?

Cancel Confirm
AR15.COM
4/25/2015 1:05:44 PM EDT
<script>

document.main.subject.value = var1 + var2;
document.main.email.value = "XXXX";;

var url="javascript:void(window.location='mailto:?cc=emailaddress&subject='+document.main.subject.value+'&body='+document.main.email.value)"
link = document.getElementById('generateEmail');
link.href=url;

</script>

<a id="generateEmail" href="#"><input type="button" value="submit" onClick="function();"></a>
<textarea id="subject"></textarea>
<textarea id="email"></textarea>


When I've got the document.main.email.value set to text, it works fine.  Populates the textarea and autofills the email.  But when I've got it set to a variable it will populate the textarea but the mailto link goes dead.
4/28/2015 1:40:12 AM EDT
[#1]
Hi neighbor, did you get this one figured out? If not, could you provide some more details about your test conditions? Chrome/browser? Jquery/libs?

Better yet, create a jsfiddle or codepen like this one that reproduces the problem and post it here.