T O P I C R E V I E W |
rkroone |
Posted - 07 Apr 2006 : 21:56:31 I have an e-mail riddler (for encrypted e-mail address) script from dynamicdrive. This is added to the head of a page or added as a external script link. This is the exact script: <SCRIPT type=text/javascript>
/*********************************************** * Encrypt Email script- Please keep notice intact. * Tool URL: http://www.dynamicdrive.com/emailriddler/ * **********************************************/
var emailarray1144= new Array(105,110,102,111,64,119,101,108,108,102,105,101,108,100,46,110,108) var postemail1144='' for (i=0;i<emailarray1144.length;i++) postemail1144+=String.fromCharCode(emailarray1144[i])
document.write('<a href="mailto:'+postemail1144+'">send mail</a>')
</SCRIPT>
All I want is to assign the script to a label (called send mail), so the label can be used as a link to send mail. How can this be done? I tried several thing with events, but nothing works. I am not a good java scripter, I prefer to borrow them :-) |
2 L A T E S T R E P L I E S (Newest First) |
rkroone |
Posted - 08 Apr 2006 : 21:53:49 This works great. Thanks a lot! |
s.dav |
Posted - 08 Apr 2006 : 10:59:52 Very simple ;-)
1- create your label or your graphical object 2- edit the events for this object (for the standard label you have to select a part of text in the label editor and press the link menu item) 3- in the event window choose onClick and JavaCall 4- in the javacall text field write 'sendMail();' without the ' char 5- create the sendMail() function basing on your code:
<script language="javascript" type="text/javascript"> <!-- function sendMail() { var emailarray1144= new Array(105,110,102,111,64,119,101,108,108,102,105,101,108,100,46,110,108) var postemail1144='' for (i=0;i<emailarray1144.length;i++) postemail1144+=String.fromCharCode(emailarray1144[i])
document.location="mailto:"+postemail1144; } //--> </script>
6- Paste this script section in the head section of your page by double-clicking over a blank part of your page; in the page properties window press Scripts/event and Header code. |
|
|