How can I launch the eMail client, and then do a page redirect with Javascript? -


I need to create a website function on the same browser as it does in IE6. A part of the current code looks like this:

  & lt; Script & gt; Function myFunc () {location.href = "mailto: test@test.com& body = Hello!"; Location.href = "newPage.html"; } & Lt; / Script & gt; & Lt; Body onload = "myFunc ();" & Gt; & Lt; / Body & gt;  

In IE, this causes the mail client to open with a specified message, and then redirects the browser to newPage.html. Other browsers, however, only redirect to newPage.html. How can I get this effect continuously throughout the browser (opens the mail client and then redirecting the page)?
As a note, I have also tried to complete it using Meta Refresh, but failed.

href Changing the property will start loading one location, changing it later and the previous navigation will be canceled.

It looks like the e-mail client will start immediately after establishing IE 6 property, then continue the JavaScript execution. Other browsers do different things, and second place will cancel the load first.

I managed to work it in chrome with timer, it can also work for other browsers:

  function myFunc () {location.href = "Melto: test@test.com& body = Hello!"; Window.setTimeout (function () {location.href = "newPage.html"}, 0); }  

Comments

Popular posts from this blog

sql - dynamically varied number of conditions in the 'where' statement using LINQ -

asp.net mvc - Dynamically Generated Ajax.BeginForm -

Debug on symbian -