Yesideez Posted June 26, 2007 Share Posted June 26, 2007 Hi, I've got this small JS script: function doemail($name,$domain) { window.location='mailto:'.$name.'@'.$domain; return false; } In my HTML I've got this: <a href="javascript:doemail('someone','hotmail.co.uk')">My NAme</a> What I'm trying to do is make the link just like I've used "mailto:" in the href but it doesn't work. Any idea what's wrong with it please? Quote Link to comment Share on other sites More sharing options...
Yesideez Posted June 26, 2007 Author Share Posted June 26, 2007 Fixed it with this instead: <script type="text/javascript">emailE=('some' + 'one' + '@' + 'hotmail' + '.co.uk');document.write('<a href="mailto:' + emailE + '">I Oliver</a>');</script> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.