HTML and CSS Reference
In-Depth Information
Figure 10-2
viewing e-mail addresses in the HtML file
e-mail addresses in
the staff d irectory
Kate would like you to scramble the e-mail addresses so that they don't appear within
the Web page code; however, as shown in Figure 10-3, she'd like the e-mail addresses to
be unscrambled when a browser loads and renders the page for a user. This mechanism
will thwart most e-mail harvesters examining the document's HTML code while making
the addresses available to users viewing the page on the Web. Note that some e-mail
harvesters can still view both the underlying code and the page as they are rendered by
a browser, so the proposed scrambling method will not be 100% effective. However,
because this technique will thwart many e-mail harvesters, Kate accepts it as a compro-
mise solution.
Figure 10-3
scrambling e-mail addresses
<script type="text/javascript">
showEM("reldac","vog.lpm");
</script>
e-mail address scrambled with JavaScript,
keeping it from appearing in the page code
the browser runs a JavaScript program
to unscramble the e-mail address …
… that the end user can view
Neither HTML nor XHTML has features that allow you to scramble and unscramble
the e-mail addresses from Kate's staff directory. This is not a standard function of Web
browsers either. Therefore, you'll have to write a program to do this. Kate doesn't want
library patrons to have to download any special applications; she wants the scrambling
Search WWH ::




Custom Search