Page is a not externally linkable
- Google
-- Google News Archive
---- Does Google reward valid code?


g1smd - 10:37 pm on Jul 3, 2002 (gmt 0)


I found that old code from TheCounter.com does not validate. Here's a new version that can replace their offering.

Check if your server is c1. or c2. or c3.thecounter.com before using...


<!-- Start of TheCounter.com Code -->
<SCRIPT type="text/javascript" language="javascript1.2"><!--
s="na";c="na";j="na";f=""+escape(document.referrer)
//--></SCRIPT>
<SCRIPT type="text/javascript" language="javascript1.2"><!--
s=screen.width;v=navigator.appName
if (v != "Netscape") {c=screen.colorDepth}
else {c=screen.pixelDepth}
j=navigator.javaEnabled()
//--></SCRIPT>
<SCRIPT type="text/javascript" language="javascript1.2"><!--
function pr(n) {document.write(n,"\n");}
NS2Ch=0
if (navigator.appName == "Netscape" &&
navigator.appVersion.charAt(0) == "2") {NS2Ch=1}
if (NS2Ch == 0) {
r="&size="+s+"&colors="+c+"&referer="+f+"&java="+j+""
pr("<A HREF=\"http://www.TheCounter.com\" TARGET=\"_top\"><IMG")
pr("ALIGN=\"CENTER\" BORDER=\"0\" ALT=\"TheCounter\"")
pr("SRC=\"http://c1.thecounter.com/id=000000000"+r+"\"></"+"A>")}
//--></SCRIPT>
<NOSCRIPT><A HREF="http://www.TheCounter.com" TARGET="_top"><IMG
SRC="http://c1.thecounter.com/id=000000000" ALIGN="CENTER"
BORDER="0" ALT="TheCounter"></A></NOSCRIPT>
<!-- End of TheCounter.com Code -->

You will need to change the digits 000000000 to be your own ID number.
There are two separate places in the code where this has to be done.

The word CENTER can be changed to LEFT or RIGHT if you need a different
alignment of the image. There are two places that this needs to be done.

This is a list of the changes:

Old: <SCRIPT><!--
New: <SCRIPT type="text/javascript" language="javascript1.2"><!--

Old: <SCRIPT language="javascript1.2"><!--
New: <SCRIPT type="text/javascript" language="javascript1.2"><!--

Old: <SCRIPT><!--
New: <SCRIPT type="text/javascript" language="javascript1.2"><!--

Old: pr("BORDER=0 SRC=\"http://c1.thecounter.com/id=000000000"+r+"\"></A>")}
New: pr("ALIGN=\"CENTER\" BORDER=\"0\" ALT=\"TheCounter\"")
New: pr("SRC=\"http://c1.thecounter.com/id=000000000"+r+"\"></"+"A>")}

Old: SRC="http://c1.thecounter.com/id=000000000" BORDER=0></A>
New: SRC="http://c1.thecounter.com/id=000000000" ALIGN="CENTER"

Old: </NOSCRIPT>
New: BORDER="0" ALT="TheCounter"></A></NOSCRIPT>

This corrects most of the errors that occur if the code is submitted
to the W3C HTML Validator at: <http://validator.w3.org/>.

Yeah, this also threw up a <NOSCRIPT> problem sometimes.


Thread source:: http://www.webmasterworld.com/google_archive/3871.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com