A few years ago I wrote a script for someone to hide multiple e-mail addresses. Now they are changing their editor from FrontPage to Dreamweaver. (I don’t know either so I don’t know if that matters. Evidently they are using templates and don’t know where to put it.) I am trying to re-write the script to be non-obtrusive and Dreamweaver-compatible. I was thinking of maybe using a class selector to implement it on the page but can’t figure it out. Any help would be greatly appreciated (and credit where do). The original code is below.
[CODE]
var userName = new Array();
userName[0]=”keeperoftheweb”;
userName[1]=”rodadams”;
userName[2]=”debbanker”;
userName[3]=”markbeckstrom”;
userName[4]=”donnabiehl”;
userName[5]=”jessehernandez”;
userName[6]=”carolchristian”;
userName[7]=”dawnchorobik”;
userName[8]=”dianecooper”;
userName[9]=”jeanduchaj”;
userName[10]=”jackieflannery”;
userName[11]=”mariaestelagalvan”;
userName[12]=”gladysgarciajimenez”;
userName[13]=”michellededecker”;
userName[14]=”lillieglover”;
userName[15]=”aliciagutierrez”;
userName[16]=”arlenehibbard”;
userName[17]=”ninawall”;
userName[18]=”carolynmelka”;
userName[19]=”rositanurse”;
userName[20]=”karenferrusquia”;
userName[21]=”joycehsieh”;
userName[22]=”steveplacek”;
userName[23]=”j”;
userName[24]=”deborahramus”;
userName[25]=”deereinhardt”;
userName[26]=”cherminerifai”;
userName[27]=”renatarobinson”;
userName[28]=”brendaschindlbeck”;
userName[29]=”juantemiquel”;
userName[30]=”nancyterry”;
userName[31]=”ericadobbertin”;
userName[32]=”maryyapenjian”;
userName[33]=”kathywall”;
userName[34]=”lugeniathomas”;
userName[35]=”jovitamunoz”;
var siteName = “thatCorp.com”;
i=0;
do userName[i]='<a href=”mailto:’ + userName[i] + ‘@’ + siteName + ‘”>’ + userName[i] + ‘@’ + siteName + ‘</a>’;
while(userName[++i])
Usage:
[CODE]
<script type=”text/javascript”>document.write(userName[20])</script>