body onunload event break mailto link RRS feed

  • Question

  • I have a very simple page that I am attempting to run in IE 9. The challenge is that when an event handler is tied to the onunload event of the body and the feedback link is clicked, the page will show the mail program but I lose the original page with the link on it. If the onunload event handler is removed from the body, it works as expected. <o:p></o:p>

    I need to figure out how to get this to work correctly (page with link stays displayed and the mail program opens) WITH the onunload event handler as the code in that event is needed for my application. any assistance would be appreciated.

    FYI - I also tested it in Chrome with the onunload event and it works as expected (i.e. email program is opened and page with the link re-displays.)

    <!DOCTYPE html>
    <html xmlns="">
     <script type="text/javascript">
         function CallToOpener() {
    <body onunload="CallToOpener()">
        <a tabindex='152' href='' >Feedback </a><br />

    George Ceaser

    Friday, May 3, 2013 5:52 PM


All replies

  • Hi,

    have you tested by turning off your popup blocker(s)?

    onunload=return false;

    for questions about html, css and scripting for website development please post to the MSDN Web Development forum.

    Questions regarding Internet Explorer 8, 9 and 10 for the IT Pro Audience. Topics covered are: Installation, Deployment, Configuration, Security, Group Policy, Management questions. If you are a consumer looking for answers or to raise a question, it's highly recommended you head on over to


    Friday, May 3, 2013 10:13 PM
  • Hi,

    In addition, if this page is developed by you, you can change the website code and see how it works.


    Vincent Wang
    TechNet Community Support

    Tuesday, May 7, 2013 2:54 AM
  • @Vincent..

    he has reposted in the Web Development Forum.... apparently he did not tell us that this is a local file.


    Tuesday, May 7, 2013 4:48 AM
  • Sorry - I have posted this in the forum recommended.  The return false does nothing.  I had already tried that.  thank for everyone's help.  I will mark this one resolved.

    George Ceaser

    • Marked as answer by George Ceaser Tuesday, May 7, 2013 12:52 PM
    Tuesday, May 7, 2013 12:52 PM