[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 466
  • Last Modified:

window.open("mailto:anyaddress") does not work in Netscape

Hi,

I need to in client function call to mailto - to open defaul mail program.
I use:
window.open("mailto:anyaddress")  - works OK in IE
but does not work in Netscape 7.2.
what to do instead?
0
netformx
Asked:
netformx
  • 2
1 Solution
 
UnexplainedWaysCommented:
Most code i've seen uses <a href="mailto:anyaddress">Email me</a>

Is there any reason why you need to window.open it?
0
 
radnorCommented:
Why not just a regular mail to link???

<a href="mailto:myaddress@abc.com">Email Me!</a>
0
 
netformxAuthor Commented:
I need to open mail in client javascript function (when click on Button and not on link).
0
 
UnexplainedWaysCommented:
"when click on Button and not on link"


I just tested this and it worked:

<html>
<head>
<script language=javascript>

      function DoThat()
      {
            window.location = "mailto:this@that.com";
      }

</script>
</head>
<body>

      <input type=button value=DoThat onclick=DoThat()>

</body>
</html>
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now