PDA

View Full Version : help with script


youngbuck
10-07-2004, 12:00 PM
i need a javascript that hides my email addy in a web page, but here's the kicker...instead of showing text for the link I want to display an image. This is what I'm curently using to hide my email addy, but like I said I don't want to diplay text, but an image instead...

<script language=javascript>
<!--
var username = "username";
var hostname = "hostname.com";
var linktext = "Displayed Link";
document.write("<a href=" + "mail" + "to:" + username +
"@" + hostname + ">" + linktext + "</a>")
//-->
</script>

Horus_Kol
10-07-2004, 12:02 PM
you didn't wait long to be told where to post, did you... :P


nevermind.


simply replace the linktext part of your document.write with:


document.write("<a href=" + "mail" + "to:" + username +
"@" + hostname + "><img src='img.jpg'></a>")

youngbuck
10-07-2004, 12:11 PM
:) Sorry hope i didn't "F" up? Thank you so much for the help, Gosh I'm going to love here, that was fasttttttttttttttttttttt