First, how do I check what arguments downloadUrlAdd() returns? I'm
trying to use Chrome's Developer Tools and Javascript Console, but
can't seem to figure it out.

Second, to make sure we're talking about the same code, I'm just going
to copy + paste, though it's still accessible at the link I gave
before http://www.thegutenberg.com/n0space/

    function saveData() {
      var name = escape(document.getElementById("name").value);
      var contact = escape(document.getElementById("contact").value);
      var comment = escape(document.getElementById("comment").value);
      var type = document.getElementById("type").value;
      var latlng = marker.getPosition();

      var url = "n0space_addrow.php?name=" + name + "&contact=" +
contact +
                "&comment=" + comment +
                "&type=" + type + "&lat=" + latlng.lat() + "&lng=" +
latlng.lng();
      downloadUrlAdd(url, function(data, responseCode) {
        if (responseCode == 200 && data.responseText <= 1) {
          marker.infowindowAdd.close();
          document.getElementById("message").innerHTML = "Location
added.";
        }
      });
    }

    function downloadUrlAdd(url, callback) {
      var request = window.ActiveXObject ?
          new ActiveXObject('Microsoft.XMLHTTP') :
          new XMLHttpRequest;

      request.onreadystatechange = function() {
        if (request.readyState == 4) {
          request.onreadystatechange = doNothing;
          callback(request, request.status);
        }
      };

On Dec 14, 2:39 pm, Rossko <[email protected]> wrote:
> > outside of load() entirely. But submitting a new entry by clicking
> > "save&close" does notclosethe infowindowAdd.
>
> I think
>    if ( .... == 200 && data.responseText <= 1)
> crashes in your callback ; have a look at what your downloadUrlAdd()
> returns as its second argument ; its just a string, already acted on
> by .responseText() method.  Maybe you need to check its length.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps JavaScript API v3" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-maps-js-api-v3?hl=en.

Reply via email to