Open mailto after click in IE8/Chrome

Posted by Rakward on Stack Overflow See other posts from Stack Overflow or by Rakward
Published on 2010-03-23T13:30:55Z Indexed on 2010/03/23 13:33 UTC
Read the original article Hit count: 509

Filed under:
|
|
|
|

I'm currently trying to do the following:

Trigger: click on a name in a select list.

Action : open mailto-link in current window, thus opening an email client.

$(document).ready(function(){    

// Define click-event
$('option').click(function(){
    var mail = $(this).attr('value');
    window.open('mailto:'+mail, '_self');
    });

});

I've also tried using this instead of window.open:

parent.location.href= 'mailto:'+mail;

However, both work only in firefox, get no errors/results in IE8 or Chrome.

Anybody know what the problem could be?

© Stack Overflow or respective owner

Related posts about mailto

Related posts about ie8