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 ******************************************************