Forum Moderators: open

Message Too Old, No Replies

Hit Counters and <noscript> errors

errors occur during validation

         

jimshu79

7:15 pm on Mar 2, 2004 (gmt 0)

10+ Year Member



Anyone else experiencing this? If so what are some options to pass validation...?

Ex:
Line 99, column 123: document type does not allow element "NOSCRIPT" here; missing one of "APPLET", "OBJECT", "MAP", "IFRAME", "BUTTON" start-tag
...ounter/counter.js"></script><noscript><a href="http://www.statcounter.com" ta

DrDoc

12:51 am on Mar 3, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Where's the noscript tag currently located?

RonPK

8:33 pm on Mar 3, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Make sure it's not <p><noscript>inside a paragraph</noscript></p>.

jimshu79

11:13 pm on Mar 3, 2004 (gmt 0)

10+ Year Member



I dont know why i dont get the error anymore... =/ i think it's maybe cause i corrected other errors. thanks for the tips!

vkaryl

2:41 am on Mar 7, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Seems like a good place to post this:

I've used Muquit's counters for years. When I decided (late, admittedly but then better late than never as some famous person said!) to migrate all my pages (hundreds on various sites) to html 4.01 strict, I immediately began to have errors (other than the norm *sigh* - doesn't matter how good YOU think you are, only how good W3C thinks you are....) on the counter-code itself on every page where a counter was installed.

An email to Muhammed Muquit got no helpful response. So I posted around various sites with info on CSS, newer versions of html, etc. and finally someone pointed me in the right direction.

The counters use EITHER "&" or "¦" as variable-expression concatenators. Since newer html is FAR more persnickety about the "&" symbol (requiring it to be escaped if used at all), only the "¦" symbol is usable in the concatenation of variables in Muquit's counters. While the docs for the counters address using either/or, nowhere is it addressed that you MUST use "¦" in order to validate under html 4.01 strict.

Counters all validate fine now. Hopefully this will help another person with way too much to learn in way too little time....

g1smd

11:28 pm on Mar 7, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Another one to note is that closing HTML tags inside document.write statements, need to be escaped too.

Change stuff like </a> and </tr> to be <\/a> and <\/tr> instead.