mr johnson
04-18-2005, 02:49 PM
Hi All,
I found this code to hide an email address, did a few tweaks and it works fine. I'd like to call the routine by clicking a graphic rather than plain text but the examples I've seen are perhaps more complex than I need here (uh, didn't understand) or related to other tasks.
Can someone offer suggestions or point me to a tutorial that would point out this basic syntax? It seems that the function must be modified to something that includes an onclick and/or a path to the image. The head and body could remain as is?
Thanks
mr johnson
This resides in the directory format
var somebody = "mrdeeds";
var somewhere = "washington.com";
function hem()
{
document.write("<a href=\"mailto");
document.write(":" + somebody + "@");
document.write(somewhere + "\">" + somebody + "@" + somewhere + "<\/a>");
}
this is in the head
<script language="JavaScript" src="format/hem.js">
</script>
this is in the body
<script language="JavaScript" type="text/javascript">
hem()
</script>
I found this code to hide an email address, did a few tweaks and it works fine. I'd like to call the routine by clicking a graphic rather than plain text but the examples I've seen are perhaps more complex than I need here (uh, didn't understand) or related to other tasks.
Can someone offer suggestions or point me to a tutorial that would point out this basic syntax? It seems that the function must be modified to something that includes an onclick and/or a path to the image. The head and body could remain as is?
Thanks
mr johnson
This resides in the directory format
var somebody = "mrdeeds";
var somewhere = "washington.com";
function hem()
{
document.write("<a href=\"mailto");
document.write(":" + somebody + "@");
document.write(somewhere + "\">" + somebody + "@" + somewhere + "<\/a>");
}
this is in the head
<script language="JavaScript" src="format/hem.js">
</script>
this is in the body
<script language="JavaScript" type="text/javascript">
hem()
</script>