Problem with XHTML

6 views
Skip to first unread message

Frank Natoli

unread,
Jan 20, 2012, 3:59:42 PM1/20/12
to google-map...@googlegroups.com
Must convert Google Map JavaScript to operate inside XHTML. On entry to "Initialize" function, first statement appears to stop JavaScript execution.

See code below. If I put "alert" before and after the "var" statement, first alert is executed, second is not. If I comment-out the "var" statement, second alert is then executed. This code works perfectly in HTML but not XHTML. What could be objectionable to XHTML?

<?xml version="1.0" encoding="UTF-8"?>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" xmlns:epub="http://www.idpf.org/2007/ops">
<head>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no"/>
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
<link href="default.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?sensor=false">
</script>
<script type="text/javascript">
  function initialize() {
    var myLatlng = new google.maps.LatLng(50.391652,5.932534);

davie

unread,
Jan 22, 2012, 9:29:10 AM1/22/12
to Google Maps JavaScript API v3
Hi
Your original post on this subject is still current.

Regards Davie
Reply all
Reply to author
Forward
0 new messages