title: how to load map on click of the button
body: <p>trying to implement the following but its not working</p>
  
  <pre><code>&lt;script&gt;
       function loadmap(lat,lng)
                  {
                  //alert("lat,lang");
                  var point = new google.maps.LatLng('12.9833','77.5833');
                  document.getElementById("menu").disabled=true;
                }
      &lt;/script&gt;
  &lt;body&gt;
  &lt;div id="container"&gt;
  
  &lt;div id="header" style="background-color:#FFA500;"&gt;
  &lt;h1 style="margin-bottom:0;"&gt;World Traveler&lt;/h1&gt;&lt;/div&gt;
  
  &lt;div id="menu" style="background-color:#FFD700;height:800px;width:100px;float:left;"&gt;
  &lt;table border="0"&gt;
  &lt;tr&gt;
  &lt;th&gt;Cities&lt;/th&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
  &lt;td onclick="loadMap('40.44','83.43');"&gt;newyork&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
  &lt;td onclick="loadMap('42.3295','-83.1908');"&gt;Michigan&lt;/td&gt;
  &lt;/tr&gt;
  script type="text/javascript"&gt;
          var map;
          var markersArray = [];
  
          function initialize()
          {
              var latlng = new google.maps.LatLng(12.9833, 77.5833);
              var myOptions = {
                  zoom: 10,
                  center: latlng,
                  mapTypeId: google.maps.MapTypeId.ROADMAP
              };
              map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);
  
  
              // add a click event handler to the map object
              google.maps.event.addListener(map, "click", function(event)
              {
                  // place a marker
                  placeMarker(event.latLng);
  
                  // display the lat/lng in your form's lat/lng fields
                  document.getElementById("latFld").value = event.latLng.lat();
                  document.getElementById("lngFld").value = event.latLng.lng();
              });
          }
          function placeMarker(location) {
              // first remove all markers if there are any
              deleteOverlays();
  
              var marker = new google.maps.Marker({
                  position: location,
                  icon: "http://localhost:8080/HTML5/pin_blue.png",
                  map: map
              });
  
              // add marker in markers array
              markersArray.push(marker);
  
              //map.setCenter(location);
          }
  
          // Deletes all markers in the array by removing references to them
          function deleteOverlays() {
              if (markersArray) {
                  for (i in markersArray) {
                      markersArray[i].setMap(null);
                  }
              markersArray.length = 0;
              }
          }
      &lt;/script&gt;
  </code></pre>
  
  <p>when ever the user clicks the menu that particular map with marker  should be displayed .iam implementing this in js...Anyhelp would be appriciated. </p>