April 1, 2012

MailTo using Browser Options in new window IE 8

Question by abcdefghi

Below is the HTML

<a id="LnkEmail" onclick="doMailto('d@s.com');" href="javascript:void(0);">
<span id="LblEmail">ABC</span></a>

Javascript

<script type="text/javascript">
    function doMailto(EmailAddress) {
        document.location.href = window.open('mailto:' + EmailAddress, 'new window');
    }

</script>

In FireFox, it opens the image on clicking the span like below.

enter image description here
Query – In IE 8 – Nothing happens on clicking it. Any Idea ?

Answer by Starx

The mailing list is an utility features provided by Firebox only. You may or may not not find one software’s feature on another similar one. If you don’t, you should settle for a work around.

Try to remember that in firefox once the user selects a default mail client, you will not get the popup anymore. So there is no use of attempting to create a solution, that is not going to be permanent.

To trim down your requirement, you are trying to select the mail client of the user. But a website cannot changed the system settings of the user, its simply not allowed. Why? Because it opens many vulnerabilities to the user, if this was somehow allowed.

...

Please fill the form - I will response as fast as I can!