I have to email some information and I can't use PHP unfortunately. I've set up an input to get the email address of a user.
<form name="email-form">
<div class="email">
Enter your email:
<input type="email" name="email-value">
</div>
<a type="submit" class="email-link" value="Email Results"></a>
</form>
What I thought I could do is set up an onClick event like this and append the user input to the end of the mailto: part.
var emailAddy = $("email-value").val();
$(".email-link").on("click", function(){
$(".email-link").prop("href", "mailto:").append( emailAddy );
});
In don't get any errors running this code, but when the mail client comes up, the "to:" section is blank. Is this even possible?