Monticello Avenue

The Community Network for Charlottesville & Albemarle County, VA

Server Side Includes

The following examples of code will enable you to include dynamic information on your web site. Add the code to your index, home or default page.

For assistance in implementing these server side includes, contact the Monticello Avenue staff at webmaster@avenue.org.

Last Modified

Last Modified

This document was last modified: <!--#echo var="LAST_MODIFIED"-->

Would display as: This document was last modified: Thursday, November 18, 2016

Site Visit Counter

There have been <!--#exec cgi="/cgi-bin/count"--> connections to this page.

Would display as: There have been 100 (for example) 4092 connections to this page.

Spam Proof Email Script

By storing the name, at sign, domain, and dotcom separately; and using JavaScript to write out the mailto tag using variables, we can foil e-mail trolling bots.

To modify this JavaScript to suit your needs, simply change the values assigned to the variables, and the content of the document.write lines below.

<script language="JavaScript">
<!-- Hide me from older non-JavaScript-enabled browsers

var name = "MonticelloAvenueuserID";
var atsign = "@";
var virtual_domain = "avenue";
var dotcom = ".org";

document.write("<div align=center>Comments/suggestions? ");

document.write("<a href=mailto:", name + atsign + 
virtual_domain + dotcom, ">E-mail</a>");

document.write(" them to us.");

document.write("</div>");

// -->
</script>
Updated Thursday, 14-Apr-2016 08:47:32 EDT© 2012 Monticello Avenue  All Rights Reserved   434 979 7151 ext 6662   201 East Market Street   Charlottesville VA 22902