1

My problem is similar to this post: mailto causing a blank page in IE8 when used with Dojo.

I have a page with a mailto link and when the user click on the link, the email client opens as expected, but the page goes blank. This only happens in ie8.

I already tryed opening the email client with a target=_blank, but the problem persists. I also tryed opening the email client through a clickhandler in the Anchor instead of using the mailto href as followed in the code below.

Anchor link = new Anchor("foo@bar.com");
link.addClickHandler(new ClickHandler() {

@Override
public void onClick(ClickEvent event) { Windows.openEmail("foo@bar.com", ""); }
});

I'm guessing the problem is with the protected mode, but I need this to work on ie8 without having to ask the user to configure anything on the browser. The application runs in intranet mode, so this error won't "magically go away when publishing to the internet" as one of the answears from the post I linked says.

I'm developing in GXT. Does anyone have a solution for this please?

Thanks.

Community
  • 1
  • 1
Lucas Lopes
  • 76
  • 1
  • 8

1 Answers1

1

Using a hidden iFrame as target link and javascript:window.open in href solved this issue for me :

<a runat="server" target="iframe2" 
href="javascript:window.open('mailto:foo@bar.com')">Foo</a>
<iframe style="display: none" name="iframe2"></iframe>

Hope it helps.