Reputation:
I got an email saying that my mailto button wasn't working on Win8.
<input onclick="open('mailto:[email protected]?subject='+document.getElementById('subject').value,'_self');" type="button" id="btn" value="Email Me">
I'm wondering what kind of browser support exists for the 'mailto:' href. Furthermore, since I am triggering this via javascript, could a 'triggered' method be breaking this in windows8?
Upvotes: 3
Views: 3816
Reputation: 30388
Looking at the References section of the Wikipedia article on the mailto
URI scheme, I see that mailto
was defined in RFC 2368, which was published in July 1998. The spec was also updated in RFC 6068 in October 2010. Since mailto
has been defined for so long, and I've never personally seen a modern computer that it doesn't work on, it probably has global support by now.
Upvotes: 3
Reputation: 869
mailto is one of the oldest tags out there. It's the open part that's going to give you fits.
Why not style a link to make it look like a button and do this instead?
<a href="mailto:[email protected]?subject=Something">Email me</a>
Now, I know that you want to put a subject in there, and that's cool. You might just want to do that with jQuery instead at that point, or creating a function that hrefs to mailto instead instead.
Upvotes: 1