Erik,

You where right! My code was validated inserting spaces between the ">" and "&" characters.
My doubt  is know why the validators odnt understand those characters togheter. I will try to find some documentation and DOM specifies to discover why that happpens.

BTW, Erik, you advice was very usefull. Thanks a lot.


Genau L. Junior
www.meucarronovo.com.br/quemsomos.php







Erik Peterson wrote:
Gene Falck wrote:
Hi Erik,

Which is about what I was suspecting--its one thing
to give the user agent an entity when what you want
is a text rendering of a character and quite another
to use an entity where the program must treat it as
part of your coding. BTW, do you see any difference
in this matter between & and &?

Regards,

Gene Falck
[EMAIL PROTECTED]

I thought that I had successfully used < as a comparison in a _javascript_ before, but of course, now I can't find where I did that.  I would have thought that & would behave exactly as &, but thought it might be an interesting avenue to explore...

I tend to have all of my _javascript_ in external files which is the other way to make sure that this doesn't happen.

A very interesting note, however.  I did some testing and found that while this failed validation:

  if(document.getElementById&&screen.width>1000)

this did *not* fail:

  if(document.getElementById && screen.width > 1000)

and I tried that code in various documents: HTML 4.01, XHTML 1.0 trans, XHTML 1.0 Strict and XHTML 1.1 Strict...  all passed.

It seems that the validator only really complains when & and > are butted up against other characters that aren't part of character entities and tags, respectively.

-Erik
******************************************************
The discussion list for  http://webstandardsgroup.org/

See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list & getting help
******************************************************




****************************************************** The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list & getting help ******************************************************

Reply via email to