Using the DistanceMatrixService.GetDistanceMatrix, getting 'B' is null or not an object
<pre><code>&lt;script type=text/javascript src=https://maps.googleapis.com/maps/api/js?    sensor=false&gt;&lt;/script&gt;
&lt;script language=JavaScript&gt;
var mileageidx = new Number();
function getMileage(idx)
{
  // code snipped
  mileageidx = idx;
  var service = new google.maps.DistanceMatrixService();
  service.getDistanceMatrix({ origins: [zipCode], destinations: [hostClubZipCode],    travelMode: google.maps.TravelMode.DRIVING, unitSystem: google.maps.UnitSystem.IMPERIAL, avoidHighways: false, avoidTolls: false}, callback());
  // code snipped
}
function callback(response, status)
{
  alert('in callback routine, mileageidx ='+mileageidx+' google status = '+status);
  if (status == google.maps.DistanceMatrixStatus.OK)
  {
    var origins = response.originAddresses;
    var destinations = response.destinationAddresses;
    for (var i = 0; i &lt; origins.length; i++)
    {
      var results = response.rows[i].elements;\n";
      for (var j = 0; j &lt; results.length; j++)\n";
      {
        var element = results[j];
        var distance = element.distance.text;
        alert('distance='+distance);
        var duration = element.duration.text;
        var from = origins[i];
        var to = destinations[j];
      }
    }
  }
  else
  {
    if (status == google.maps.DistanceMatrixStatus.INVALID_REQUEST)
    {
      alert('google.maps.DistanceMatrixStatus was INVALID_REQUEST');
    }
    if (status == google.maps.DistanceMatrixStatus.MAX_ELEMENTS_EXCEEDED)
    {
      alert('google.maps.DistanceMatrixStatus was MAX_ELEMENTS_EXCEEDED');
    }
    if (status == google.maps.DistanceMatrixStatus.OVER_QUERY_LIMIT)
    {
      alert('google.maps.DistanceMatrixStatus was OVER_QUERY_LIMIT ');
    }
    if (status == google.maps.DistanceMatrixStatus.REQUEST_DENIED)
    {
      alert('google.maps.DistanceMatrixStatus was REQUEST_DENIED');
    }
    if (status == google.maps.DistanceMatrixStatus.UNKNOWN_ERROR)
    {
      alert('google.maps.DistanceMatrixStatus was UNKNOWN_ERROR');
    }
  }
}
</code></pre>

<p>When the code gets executed, I get the message 'b' is null or not an object
DistanceMatrixService.getDistanceMatrix    Line 1
Code: 0                                    Char: 1
URL: <a href="https://maps.googleapis.com/maps/api/js/DistanceMatrixService.GetDistanceMatrix?1m1&amp;2s80" rel="nofollow">https://maps.googleapis.com/maps/api/js/DistanceMatrixService.GetDistanceMatrix?1m1&amp;2s80</a>...</p>

<p>This code worked twice, then started giving this error.</p>
