Alex Mcauley pisze:
> Good morning peoples!..
> 
> Perhaps not totally on topic but prototype related nontheless
> 
> I was just validating my site using http://validator.w3.org to which i
> got 1767 errors. Most of these errors pertain to javascript inside
> prototype - for example...
> 

Why are you trying to validate javascript with HTML validator?
Is there any reason you have to include prototype.js inside HTML file?

Prototype.js is perfectly valid javascript which should be LINKED to 
HTML files with script tag:
  <script src="/url/to/prototype.js" type="text/javascript"></script>

If you link the prototype to the document this way, the html validator 
will not try to validate javascript, as it is not its job.

If you paste prototype.js into html file, then it is your job, as a 
developer, to properly escape it's source.
But I can see no reason to do that other than creation of signle-file 
offline html page.
Prototype.js would add more than 100KB to such page which would be 
huge overhead if it had to be downloaded on every page load

So, either use external .js file, linked throug <script src="..."> 
tag, or escape prototype.js by doing search&replace on & to &amp;,
< to &lt;, and  > to &gt;. Still it is worst you can do, but this way 
you will have valid HTML.

Best regards,
SWilk

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to