Friday, July 23, 2010

GDownloadURL

I am calling a php file using GDownloadURL.
Following is the code.

function SaveData()
{
var name = document.getElementById("name").value;
var address = document.getElementById("address").value;
var type = document.getElementById("type").value;
var comments = document.getElementById("comments").value;
var latlng = marker.getLatLng();
var lat = latlng.lat();
var lng = latlng.lng();
var zoom = map.getZoom();
content="message";
clearGetSpan();
gcallbackfunc="mcallBack()";
customGetText("<img src='images/loading.gif' border=0> Please
Wait ...");
getstr = "?name="+name+"&address="+address+"&type="+type
+"&comments="+comments+"&lat="+lat+"&lng="+lng+"&zoom="+zoom;
var url = "coverage/SaveVisitorContribution.php?"+getstr;
GDownloadUrl(url, function(data, responseCode) {
if (responseCode == 200 && data.length <= 1) {
marker.closeInfoWindow();
marker.openInfoWindow("The location has been added for
verification. Thank you for your contribution.");
}
});


}

What i want to do is, when user submits the information,
SaveVisitorContribution.php communciates with the web service and
saves the information. This information is being collected in an
infowindow on google maps marker. When the user submits the
information, it keeps showing the progress icon "Please Wait" but in
actual the value get saved into database and the request has
completed. I want a way which can let me know where the request ends
and I close the infowindow and open a new window having a thank you
message.

Please help.

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

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate