0

I'm using gMap on a site I'm finishing off and as an example from the gMap site I am using the following method;

    $('#map').gMap('addMarker',
    {
        latitude: 0,
        longitude: 0,
        content: 'Some HTML content'
    }
);

In the content: 'some HTML content' line I have added a line of html including an img and a div of text. Like this'

content: '<img src="img/shop.jpg" alt="shopfront" /><div id="map-text"><h2>Elan Hair Design</h2><p>17 Woodgate, Rothley,<br />Leicestershire. XXXXXXX</p><h3>T: XXXXXXXXX</h3></div>'

It all looks and works great, but when I validate under xhtml strict I get errors about adding a img and div tag in the content: '' line.

Have I mis-understood the type of html that can be added to this area? Or have I just done it wrong.

Any help would be greatly received.

Wayne

hoops78
  • 37
  • 9

1 Answers1

0

If you have javascript in an XHTML document the correct way to embedded it is as follows:

<script type="text/javascript">
/* <![CDATA[ */
// content of your Javascript goes here
/* ]]> */
</script>

see here for an explanation.

Nelson
  • 49,283
  • 8
  • 68
  • 81