Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I'm trying to create a link that pops open a new email in outlook:

<a href="mailto:someaddress@mail.com?subject=blah">Feedback</a>

and this works fine in firefox, but in IE9 it's literally redirecting the browser to "mailto:someaddress@mail.com?subject=blah". The email window still pops up but I need IE to remain on the same page where the mailto link was clicked.

EDIT: I have now pinpointed this to being a SharePoint 2007 problem. The mailto href works fine before adding a Search Core Results webpart to the page, but after adding the Core Results webpart, the previously described problem takes place.

share|improve this question

2 Answers 2

up vote 1 down vote accepted

I still dont know what the exact cause of the problem is but I was able to get around it by doing the following:

Add a hidden iframe to the page:

<iframe id="emailiframe" src="" style="display:none;"></iframe>

In the content editor web part that contains my "feedback" link, I set the source to:

<script type="text/javascript">
function feedbackEmail()
{
var iframe = document.getElementById("emailiframe");
iframe.setAttribute("src", "mailto:someaddress@mail.com?subject=blah");
}
</script>

<a href="javascript:void(0);" onclick="feedbackEmail(); return false;">Feedback</a>

IE now does what it's supposed to.

share|improve this answer

Have you tried this?

<a href="mailto:someaddress@mail.com?subject=blah" target="_self">Feedback</a>
share|improve this answer
    
I've tried every target attribute value and still get the same behavior. –  MattL922 Aug 15 '12 at 11:25

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.