Hello List!
I have a question on how to handle something...
I have one page that gets data from google maps & I want to get these values and then go to another page (updateAddress.asp) where I will do the update.
I'm getting the data correctly, but having issues with getting it to go to the update page; not sure if my syntax is correct for that or not?!??
Here's my page so far:
I need to go to the updatePage and do the update in the 'ajax_getValue(aid,Pg)' function....
I know the data is being returned correctly, because if i put in an alert box:
an alert box w/ the correct aid, accuracy, latitude, and longitude is popping up; just not going to updateAddress page and updating db.
Thanks much!
-jiggyg
I have a question on how to handle something...
I have one page that gets data from google maps & I want to get these values and then go to another page (updateAddress.asp) where I will do the update.
I'm getting the data correctly, but having issues with getting it to go to the update page; not sure if my syntax is correct for that or not?!??
Here's my page so far:
Code:
<html>
<head>
<title>GIS gPoint Grabber</title>
<script type="text/javascript" Language="JavaScript">
function ajax_getValue(aid,Pg){
var xhr;
try {xhr = new XMLHttpRequest()}
catch(e) {xhr = new ActiveXObject(Microsoft.XMLHTTP)}
xhr.onreadystatechange = function(){
if(xhr.readyState == 4){
if(xhr.status == 200){
if(aid != null){
var retVal = xhr.responseText.split(",");
var frm = document.forms[0];
updatePage = "updateAddress.asp?aid=" + aid + "&acc=" + retVal[1] + "&lat=" + retVal[2] + "&lng=" + retVal[3];
ajax_getValue(null,updatePage);
}
}
}
}
xhr.open("GET", Pg, true);
xhr.send(null);
}
function getAddresses(){
var url = "http%3A%2F%2Fmaps%2Egoogle%2Ecom%2Fmaps%2Fgeo%3Fkey%3DABQIAAAAPUNuytFVXrrfYEJt8knUDRTsC5VVVLeRkWyzZ2yPrwis7aeZehTdy1yIPN%5FKooi0q3MxTRebOB4Cab%26output%3Dcsv%26q%3D%2C+Atlanta%2C+GA%2C";
ajax_getValue(1, "proxy.asp?url=" + url + "&mimeType=text");
}
</script>
</head>
<body onLoad="getAddresses()">
<form>
<input type="text" name="aid"><br>
<input type="text" name="retCode"><br>
<input type="text" name="accuracy"><br>
<input type="text" name="latitude"><br>
<input type="text" name="longitude"><br>
</form>
</body>
</html>
I need to go to the updatePage and do the update in the 'ajax_getValue(aid,Pg)' function....
I know the data is being returned correctly, because if i put in an alert box:
Code:
updatePage = "updateAddress.asp?aid=" + aid + "&acc=" + retVal[1] + "&lat=" + retVal[2] + "&lng=" + retVal[3];
alert (updatePage);
an alert box w/ the correct aid, accuracy, latitude, and longitude is popping up; just not going to updateAddress page and updating db.
Thanks much!
-jiggyg