I\'d like to invoke a mailto link from JavaScript - that is I\'d like a method that allows me to open the email client on the users PC, exactly as if they had clicked on a n
Actually, there is a possibillity to avoid the empty page.
I found out, you can simply insert an iframe with the mailto link into the dom. This works on current Firefox/Chrome and IE (also IE will display a short confirm dialog).
Using jQuery, I got this:
var initMailtoButton = function()
{
var iframe = $('');
var button = $('#mailtoMessageSend');
if (button.length > 0) {
button.click(function(){
// create the iframe
$('body').append(iframe);
//remove the iframe, we don't need it any more
window.setTimeout(function(){
iframe.remove();
}, 500);
});
}
}