WordPress.org

Ready to get started?Download WordPress

Forums

Google Maps Embed Plug in (Pierre Sudarovich) Validation errors (2 posts)

  1. Dillx
    Member
    Posted 3 years ago #

    Google Maps Plug in (Pierre Sudarovich)

    This is an excellent little plugin that can be used to avoid having to use iframe. Unfortunately I think it has a minor syntax error that causes it to fail W3c validation.

    Below is the line that fails the validation

    <script src="http://maps.google.com/maps/?file=api&v=2&key=ABQIAAAAZDKXbXMIR4dQ4Ow_zXijmxTZhZbkzq23j7OS8e0AHxCphSdxdxl0eowMaOPyVYubnrhwx673w" type="text/javascript"></script><div class="GoogleMap" id="Googlemap_0" style="margin:auto;width:768px;height:512px;">Loading...
    <noscript class="infoG">Be careful to see the map you have to activate the Javascript!</noscript></div><div id="Lib_0" style="margin:auto;width:768px;"> </div><div id="directions_0"></div><script type="text/javascript" src="http://www.unknown.co.uk/wp-content/plugins/google-maps/maps.php?hl=en&ie=UTF8&msa=0&msid=202277486735667694273.0004a41d00063c13456e&ll=50.529143,-3.566437&spn=0.209516,0.439453&z=11&&Glink=http://maps.google.co.uk/maps/ms&count=0"></script> </p>

    There are three errors
    …oading...
    <noscript class="infoG">Be careful to see the map you have to ac…
    You have used character data somewhere it is not permitted to appear.

    … to activate the Javascript!</noscript></div><div id="Lib_0" style="margin:aut…
    Most likely, you nested tags and closed them in the wrong order.

    …=11&&Glink=http://maps.google.co.uk/maps/ms&count=0"></script> </p>
    The Validator found an end tag for the above element, but that element is not currently open.

    Two errors relate to the <noscript> and one for the </P>.

    It looks like it might just be that the Loading message should be enclosed in <p> tags and the </p> removed.

  2. Dillx
    Member
    Posted 3 years ago #

    I got this to validate correctly as follows :-

    Edit the script to remove the formatting like below.....

    <script src="http://maps.google.com/maps/?file=api&v=2&key=ABQIAAAAZDKXbXMIR4dQ4Ow_zXijmxTZhZXGlAJbkzq23j7OS8e0AHxCphSdxdxl0eowMayGfuhebnrhwx673w" type="text/javascript"></script>

    <div class="GoogleMap" id="Googlemap_0">Loading...Be careful to see the map you have to activate the Javascript!
    </div>

    <div id="directions_0"></div>
    <script type="text/javascript" src="http://mywebsite.co.uk/wp-content/plugins/google-maps/maps.php?hl=en&ie=UTF8&msa=0&msid=202277486735667694273.0004a41d00063c121e24e&ll=50.529143,-3.566437&spn=0.209516,0.439453&z=11&&Glink=http://maps.google.co.uk/maps/ms&count=0"></script>

    Then add your formatting in the CSS file.

Topic Closed

This topic has been closed to new replies.

About this Topic