I'm a seasoned C++ programmer but this is my first experience with java scripts. I'm making a web site for my church and I added google maps to it. The code I added (works just fine) ...
As I read up on java it says to use <!-- and //--> to hide your java code for browsers that don't support java. The below works as well.
So my question is... what is //<![CDATA[ doing that <!-- isn't?
Code:
<div id="map" style="width: 500px; height: 400px"></div> <script type="text/javascript"> //<![CDATA[ var map = new GMap(document.getElementById("map")); map.addControl(new GSmallMapControl()); map.centerAndZoom(new GPoint(-122.1419, 37.4419), 4); //]]> </script>
Code:
<div id="map" style="width: 500px; height: 400px"></div> <script type="text/javascript"> <!-- var map = new GMap(document.getElementById("map")); map.addControl(new GSmallMapControl()); map.centerAndZoom(new GPoint(-122.1419, 37.4419), 4); //--> </script>
Comment