- From: David Dorward <david@dorward.me.uk>
- Date: Fri, 05 Dec 2008 11:20:18 +0000
- To: "Jos Keuter (Dynarics)" <jos.keuter@dynarics.com>
- CC: www-validator@w3.org
Jos Keuter (Dynarics) wrote: > > Error [xmlwf]: " XML Parsing Error: xmlParseEntityRef: no name" > NOTE: Whenever possible, give the address of the document you were > checking. à Sorry, running a local project here… > So we don't know what Doctype you are using, what Content-Type you are using, or what the rest of the document looks like. > Hi, > > I get the error message above when validating a page. > > This is the code: > > <a href=”javascript:myNamespace.navigateTo('/Somewhere/Home/14/');”>…</a> I don't see an ampersand there, which is the usual cause of the error. Is this the right piece of code? As an aside... Using href="javascript:..." is not good practice. Something along the lines of: <a href="/Somewhere/Home/14/" onclick="myNamespace.navigateTo(this.href); return false;"> would be better. ... and attaching the JS event programatically (e.g. jQuery('#myMenu a').click(function () { myNamespace.navigateTo(this.href); return false; } ) would be better separation of concerns. (Please direct follow ups to www-validator and not directly to me, thanks) -- David Dorward
Received on Friday, 5 December 2008 11:20:56 UTC