The page as listed in my last post: (E display problem) has now been updated with a handwritten asp counter. The page and the counter work fine, and display correctly.
The problem that I am having is with validation. When I try to validate the site with w3c, it returns a 500 server error. This can not be correct, as the page loads in browsers just fine. At first I thought is was because the sounter scripting tries to set a cookie, but I have other pages with the same counter, and they work just fine in the validator. ALSO, the w3c page has an upload facility, and when i upload 'index.asp' to the validator, it comes out just fine.
here is the new code:
Gary
The problem that I am having is with validation. When I try to validate the site with w3c, it returns a 500 server error. This can not be correct, as the page loads in browsers just fine. At first I thought is was because the sounter scripting tries to set a cookie, but I have other pages with the same counter, and they work just fine in the validator. ALSO, the w3c page has an upload facility, and when i upload 'index.asp' to the validator, it comes out just fine.
here is the new code:
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "[URL unfurl="true"]http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">[/URL]
<html>
<head>
<!--Begin Meta Tag definitions-->
<meta name="copyright" content="Copyright © 2003-2004 Gary Robar, All Rights Reserved"/>
<meta name="classification" content="Personal"/>
<meta name="revised" content="Gary Robar, 10/01/04"/>
<meta name="revisit-after" content="15 Days"/>
<meta name="author" content="Gary William Robar"/>
<meta name="abstract" content="The personal website of Gary Robar, Halifax Nova Scotia Canada. Photosite, Music Pages, Computer Stuff, and other general areas of interest await."/>
<meta name="description" content="The Personal Website Of Gary Robar"/>
<meta name="keywords" content="gary robar, gary, robar, halifax, nova scotia, hammonds plains, park victoria, potato gun"/>
<meta name="generator" content="Microsoft FrontPage 5.0"/>
<meta name="ProgId" content="FrontPage.Editor.Document"/>
<meta name="doc-type" content="White Paper"/>
<meta name="GOOGLEBOT" content="index,follow"/>
<meta name="MSSmartTagsPreventParsing" content="TRUE"/>
<meta name="owner" content="Gary William Robaar"/>
<meta name="ROBOTS" content="ALL"/>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252"/>
<meta http-equiv="Content-Language" content="en-ca"/>
<meta http-equiv="Content-Script-Type" content="text/javascript"/>
<meta http-equiv="Content-Style-Type" content="text/css"/>
<meta http-equiv="imagetoolbar" content="no"/>
<meta http-equiv="PICS-Label" content='(PICS-1.1 "[URL unfurl="true"]http://vancouver-webpages.com/VWP1.0/"[/URL] l gen false comment "VWP1.0" by "Gary W Robar" on "2004.09.30T17:481700" for "[URL unfurl="true"]http://www.robarspages.ca/index.asp"[/URL] r (P 2 S 0 V 0 Com 1 Tol 1 Env 0 SF 0 Edu 0 Can -2 MC 0 Gam -1 ))'/>
<!--End Meta Tag definitions-->
<title>Robar's Pages - Start Page</title>
</head>
<body>
<center>
<!--Begin Table 1, 'Main'-->
<table>
<tr>
<td><img src="[URL unfurl="true"]http://www.robarspages.ca/images/splashhead3.gif"[/URL] alt="[Robar's Pages - Splash Page]"/></td>
</tr>
<tr>
<td>
<center>
<table width="445">
<tr>
<td width="445">
<table border="0" cellspacing="0" cellpadding="0" style="border-collapse: collapse" width="445">
<tr><td height="83" colspan="2" style="background: url('images/maint2.gif');"></td></tr>
<tr><td height="78" width="222" bgcolor="#282484"><center><a href="underc.asp"><img src="images/musica.gif" alt="[To Music Pages]" border="0"/></a></center></td><td height="78" width="222" bgcolor="#282484" align="center"><a href="Photosite/index.asp"><img src="images/photosite.gif" alt="[To Photosite]" border="0"/></a></td></tr>
<tr><td height="24" width="222" bgcolor="#282484"> </td><td height="24" width="222" bgcolor="#282484"> </td></tr>
<tr><td height="120" width="222" bgcolor="#282484" align="center"><a href="underc.asp"><img src="images/comp.gif" alt="[To Computer Pages]" border="0"/></a></td><td height="120" width="222" bgcolor="#282484" align="center"><a href="Photosite/admin/default.asp"><img src="images/admin.gif" alt="[To Administration]" border="0"/></a></td></tr>
<tr><td height="31" width="445" bgcolor="#282484" colspan="2"><center><img src="images/cf.gif" alt="[Canadian Content]"/>
<b><font face="Verdana" style="font-size: 10px" color="#FFFF99"><span lang="en-us"> -This Page has</span></font></b>
<%
Dim sPath, filesys, count, getValue, update, twohrs
sPath = Request.ServerVariables("Path_Translated")
sPath = Left(sPath,InStrRev(sPath,"\")) & "counter1.txt"
Set filesys = CreateObject("Scripting.FileSystemObject")
Set getValue = filesys.OpenTextFile(sPath,1,0)
' get the current value
count = getValue.ReadLine
If Request.Cookies("website_name")("recentvisitor") <> "yes" Then
' increment by 1 before displaying, 'cos they're a newbie
count = Int(count) + 1
End If
' close file
getValue.Close
%>
<%
If Request.Cookies("website_name")("recentvisitor") <> "yes" Then
' only update the value in the text file if they're a newbie
' overwrite old text file with new one
Set update = filesys.CreateTextFile(sPath)
' put new value in text file
update.WriteLine(count)
update.Close
' give them a cookie to make sure it doesn't count them more than once
Response.Cookies("website_name")("recentvisitor") = "yes"
' make it expire in 2 hours' time
twohrs = DateAdd("h", 1, Now)
Response.Cookies("website_name").Expires = twohrs
End If
%>
<%
' put a comma in the number
count = FormatNumber(count, 0, 0, -1, -1)
response.write "<b><font face='Verdana' style='font-size:10px' color='#CC0000'>["& count &"]</font></b>"
%>
<b><font face="Verdana" style="font-size: 10px" color="#FFFF99"><span lang="en-us">visits since October 02, 2004 </span></font></b><img src="images/cf.gif" alt="[Canadian Content]"/></center>
</td></tr>
<tr><td height="32" width="445" bgcolor="#282484" colspan="2"><p align="center"><font face="Verdana" style="font-size: 10px" color="#C0C0C0">All content © 2004 Gary Robar unless otherwise noted.</font></p></td></tr>
<tr><td height="25" colspan="2" style="background: url('images/mainb.gif');"></td></tr>
</table>
</td>
</tr>
</table>
</center>
</td>
</tr>
</table>
<!--End Table 1, 'Main'-->
</center>
<p>
<a href="[URL unfurl="true"]http://validator.w3.org/check?uri=referer">[/URL]
<img src="[URL unfurl="true"]http://www.robarspages.ca/images/w3c.gif"[/URL]
alt="Valid XHTML 1.0!" height="31" width="88" border="0" /></a>
</p>
</body>
</html>
Gary