Posted By

LemonPro on 09/23/10


Tagged


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

bobbym245
dext


Mailto:


 / Published in: JavaScript
 

  1. <script type=”text/JavaScript”>
  2. <!- -
  3. function myEmail(prt1,prt2,id,subject){
  4. //redirect to mailto
  5. if (subject == undefined ){
  6. window.location = ‘mailto:+ prt1 +@'+ prt2;
  7. }else{
  8. window.location = ‘mailto:’+ prt1 +’@'+ prt2 +?Subject=+ subject;
  9. }
  10. return false;
  11. }
  12. - ->
  13. </script>
  14.  
  15.  
  16. <a href=”javascript:void(0);” onClick=”myEmail(‘myname’,'mysite.com’,this,’Website Contact’);” title=”Click here to email us”>email us</a>

Report this snippet  

Comments

RSS Icon Subscribe to comments
Posted By: mark90 on October 8, 2010

check it: preview

You need to login to post a comment.