When I click the button to send an email, it is working fine but an extra window opens during the process and I am unable to close it even after trying the close
method. This issue occurs in both IE 10 and IE 11.
Below is the code snippet:
<html>
<head>
<script type='text/javascript'>
function sendMail(){
var wi = window.open('mailto:<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="92e1fdfff7fdfcf7d2f7eaf3ffe2fef7bcf1fdff">[email protected]</a>?subject=' + encodeURIComponent(document.getElementById("metric").value));
wi.close();
}
</script>
</head>
<body>
<h4>Send e-mail to committee with below subject:</h4>
<form action="javascript:sendMail()" method="post" enctype="text/plain">
<select id="metric">
<option value="test1">test1</option>
<option value="test2">test2</option>
</select>
<br><br>
<input type="submit" value="Send">
<p></p>
</form>
</body>
</html>