For general web development questions that are not specifically related to CSS HTML Validator. This includes (but is not limited to) general HTML, CSS, Accessibility, JavaScript, and SEO questions.
map.openInfoWindowHtml(map.getCenter(), "<img src='../jpg/Finian.jpg' width='64' height='80' alt='picture of Peter'><b>This is a picture of 951 Greene Street</b>");
...end tags are recognized within SCRIPT elements, but other kinds of markup--such as start tags and comments--are not. This is an unintuitive quirk of SGML for elements defined to have CDATA content.
Authors should avoid using strings such as "</P>" in their embedded scripts. In JavaScript, authors may use a backslash to prevent the string from being parsed as markup:
map.openInfoWindowHtml(map.getCenter(), "<img src='../jpg/Finian.jpg' width='64' height='80' alt='picture of Peter'><b>This is a picture of 951 Greene Street<\/b>");
Lou
Say what you will about Sisyphus. He always has work.
map.openInfoWindowHtml(map.getCenter(), "<img src='../jpg/Finian.jpg' width='64' height='80' alt='picture of Peter'><b>This is a picture of 951 Greene Street<\/b>");
Thanks Lou... that's even "cleaner".
But I still think it is best to use external script files whenever possible.
Albert Wiersch wrote:But I still think it is best to use external script files whenever possible.
I agree if there was more script to this. I think in this case the overhead of the serial file calls out weights the elegance of an external file.
Sense the "offending" script contains actual data there is no advantage of reuse and I keep thinking about the board member that uses dial-up; any overhead is a drag.
All goes to show why it is hard for a cat to keep its skin. (More than one way to skin a ...)
Lou
Say what you will about Sisyphus. He always has work.