I am not trying to validate javascript with the validator lol... My page includes it .. and having src="....." is bad coding practise due to parralell downloads ... i munge all the javascript together into one script and compress it all before output - this is not the issue........
I have now resolved the issue, thanks for your response Alex Mcauley http://www.thevacancymarket.com ----- Original Message ----- From: "Szymon Wilkołazki" <[email protected]> To: <[email protected]> Sent: Monday, September 14, 2009 11:37 AM Subject: [Proto-Scripty] Re: Prototype and Xhtml validation > > 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 &, > < to <, and > to >. 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 [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~----------~----~----~----~------~----~------~--~---
