[Google Maps API v2] Return save value
I have this code that saves my user input markers in a MySQL database:
#################################################################
function process(form) {
// == obtain the data
//var lat = lastmarker.getPoint().lat();
//var lng = lastmarker.getPoint().lng();
var header = escape(document.getElementById("form_header").value);
var info = escape(document.getElementById("form_info").value);
var city = escape(document.getElementById("form_city").value);
var myType = document.getElementById("form_type").value;
var loc = lastmarker.getLatLng();
var url = "do.asp?s80797=57798&header=" + header + "&info=" + info +
"&type=" + myType + "&location=" + loc + "&city=" + city;
alert("Your data was saved correctly!");
// ===== send the data to the server
GDownloadUrl(url, function(doc) { });
// == remove the input marker and replace it with a completed marker
map.closeInfoWindow();
var inputMarker = createUserMarker(lastmarker.getPoint());
//GEvent.trigger(inputMarker,"click" {icon:greenicon});
}
#################################################################
As it is now, the code tells the user that "Your data was saved
correctly" even if it's NOT saved correctly. Is there any way to get a
return value from "do.asp?....." that returns "true" or "false"?
Thanks for your help!
/ O
--
You received this message because you are subscribed to the Google Groups "Google Maps API V2" 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