I have one javascript that I use to hide email addresses from spammers, and another I use to create roll-overs of images. I was wondering how to combine them so I can hide the email addres that is referenced through an envelope icon that rolls over.
javascript #1 for hiding the email address (MyHandle@MyDomain.com) :
<script language="JavaScript" type="text/javascript">
document.write("<a href='mailto:"
;
document.write("MyHandle"
;
document.write("\100"
;
document.write("MyDomain.com"
;
document.write("'>"
;
document.write("Email"
; document.write("</a>"
;
</script>
The javascript #2 I use for a rollover icon (I am not including the one in the head of the document -just the code where it is displayed:
<a href="javascript:;" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Email','','Images/Nav/email2.gif',1)"><img src="Images/Nav/email1.gif" width="20" height="15" name="Email" border="0"></a>
I would like to nest Javascript #2 within javascript #1
Thanks for all your help!
javascript #1 for hiding the email address (MyHandle@MyDomain.com) :
<script language="JavaScript" type="text/javascript">
document.write("<a href='mailto:"
document.write("MyHandle"
document.write("\100"
document.write("MyDomain.com"
document.write("'>"
document.write("Email"
</script>
The javascript #2 I use for a rollover icon (I am not including the one in the head of the document -just the code where it is displayed:
<a href="javascript:;" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Email','','Images/Nav/email2.gif',1)"><img src="Images/Nav/email1.gif" width="20" height="15" name="Email" border="0"></a>
I would like to nest Javascript #2 within javascript #1
Thanks for all your help!