I am having a javascript to open a mail client in a new window to send an e-mail:
<a onClick="javascript:window.open('mailto:user@test.com', 'Mail');event.preventDefault()" href="mailto:user@test.com">Send a e-mail</a>
But the issue is that when Yahoo / Gmail clients compose pages opens up the 'To' field is set to "mailto:user@test.com" by default which should actually be "user@test.com"
How can we achieve the same - I need to open the e-mail client on a new page only
HTML Code - please note that it would open an iframe window as target:
<!DOCTYPE html>
<html dir="ltr">
<head>
<style>
span {
float: left;
width: 0.7em;
font-size: 400%;
font-family: algerian, courier;
line-height: 80%;
}
p {
letter-spacing: 2px;
line-height: 200%;
}
</style>
</head>
<body>
<hr align="centre" width="50%"/>
<p align="justify">
<img src="./images/dev.jpg" align="left" width="300px height="400px" hspace="20"/>
<strong><span>A</strong></span>t a time ... </p>
<h1>Contact:</h1>
<p align="justify">
<a href="http://www.google.com" target="_blank">Google</a><br/>
Professor<br/>
<a href="mailto:user@test.com" target="_blank">Send An e-mail</a>
<a onClick="window.open('mailto:user@test.com', 'Mail');event.preventDefault();" href="mailto:user@test.com">Send a e-mail</a>
</p>
</body>
</html>