I am trying to have my XHTML Transitional page validated using the w3 validator: [URL=”http://validator.w3.org/”]http://validator.w3.org/
However, I have used Java script on the page and am getting errors from it. Mainly, it has problems with one line,
[code]for (i = 0; i <len; i++) {
and also the close </script> tag, saying it is not correctly nested, but it is <script>…code…</script> and no other html tags in between. However, it is considering “len” (in the code above) as an element and therefore says I must first close it.
The len line is getting errors such as: “;” is not allowed, “len” is an undefined element, XML parsing errors etc.
How do you have Javascript ignored by XHTML validators/browsers. I know you can use in strings but these are not strings.
Any ideas?