I have a JSP page that pops in a new window from an application I am working on, retrieves email information, along with other data and constructs some email meta data. The code then triggers a basic mailto: call which pops up local mail client. The page that calls the mail client is supposed to close via a basic window.close but it remains open after the mail client is launched. The same code works in Firefox/Chrome. Ive stripped out all the JSP code but the below is the basis of the page, and the same issue occurs with this lightweight version.
<html>
<head>
</head>
<div class='PagePanel'>
<a id="SendEmail" href="mailto:test@test.com"></a>
<script language="JavaScript">
document.getElementById('SendEmail').click();
</script>
<script language="JavaScript">
// automatically close the newly launched browser window displaying this page as no widgets are painted on this page
window.close();
</script>
</div>
</html>
Any one know why the page doesn't close in IE9? (IE9 support needed) Closes in Firefox and Chrome.