Forum Moderators: open
1. When I create a stylesheet with a declaration like margin-top:1em, the "e" in "em" is coded the same color as the "1". This doesn't happen with "px". Anyone know what's happening there?
2. Inside a javascript document.write statement, the word "this" is always shown in bold, even though it's just text to be written. I assume it's because the word "this" has a special function in Javascript.
Should I be escaping any occurances of "this" in a document.write? It doesn't seem to work very well if I do.
A2. This will only happen when you use single quotes in a document.write statement. If you use double quotes, Homesite recognizes it as a string and won't bold this or other commonly bolded keywords like write. Apparently it doesn't recognize things inbetween single quotes as strings (you can tell because it doesn't italicize the string).
Should I be escaping any occurances of "this" in a document.write?
By no means, it's just an IDE problem - nothing wrong with your code - though it might be clearer to you as a programmer if you started using double-quotes.