Validating Google Maps

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.
User avatar
Lou
Rank V - Professional
Posts: 295
Joined: Fri Jul 29, 2005 5:55 pm
Location: CO
Contact:

Re: Validating Google Maps

Post by Lou »

Code: Select all

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>");
From the w3c, www-validator Community form I got this reference http://www.htmlhelp.com/tools/validator ... tml#script which says about HTML in Script in part
...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:
So this works cleanly.

Code: Select all

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.
User avatar
Albert Wiersch
Site Admin
Posts: 3783
Joined: Sat Dec 11, 2004 9:23 am
Location: Near Dallas, TX
Contact:

Re: Validating Google Maps

Post by Albert Wiersch »

Lou wrote:So this works cleanly.

Code: Select all

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". :D

But I still think it is best to use external script files whenever possible.
Albert Wiersch, CSS HTML Validator Developer • Download CSS HTML Validator FREE Trial
User avatar
Lou
Rank V - Professional
Posts: 295
Joined: Fri Jul 29, 2005 5:55 pm
Location: CO
Contact:

Re: Validating Google Maps

Post by Lou »

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.
Post Reply