wilberforce2
IS-IT--Management
I was wondering if someone could tell me why this tutorial is did from
It's just what I am looking for to complete a project I am working on but cannot get it to work I am not getting any errors it just fails to work. I am hoping that an expert will be able to see the error.
It's just what I am looking for to complete a project I am working on but cannot get it to work I am not getting any errors it just fails to work. I am hoping that an expert will be able to see the error.
Code:
<%@ Page Language="VB" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "[URL unfurl="true"]http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">[/URL]
<script runat="server">
</script>
<html xmlns="[URL unfurl="true"]http://www.w3.org/1999/xhtml"[/URL] >
<head runat="server">
<title>Test Google Goecode</title>
<script src="[URL unfurl="true"]http://maps.google.com/maps?file=api&v=2&key=ABQIAAAAdgQay5Vsf5PsEiFa2agefBT2yXp_ZAY8_ufC3CFXhHIE1NvwkxROjC-8ITWm-zgzl_cMNuItxRV-MA"[/URL] type="text/javascript"></script>
<script src="[URL unfurl="true"]http://www.google.com/uds/api?file=uds.js&v=1.0&key=ABQIAAAAdgQay5Vsf5PsEiFa2agefBT2yXp_ZAY8_ufC3CFXhHIE1NvwkxROjC-8ITWm-zgzl_cMNuItxRV-MA"[/URL]
type="text/javascript"></script>
<script language=javascript type="text/javascript">
var localSearch = new GlocalSearch();
function usePointFromPostcode(postcode, callbackFunction) {
alert ("Function Called " + postcode)
localSearch.setSearchCompleteCallback(null,
function() {
if (localSearch.results[0]) {
var resultLat = localSearch.results[0].lat;
var resultLng = localSearch.results[0].lng;
var point = new GLatLng(resultLat,resultLng);
callbackFunction(point);
}else{
alert("Postcode not found!");
}
});
localSearch.execute(postcode + ", UK");
}
</script>
</head>
<body>
<form id="form1">
<input type=text id="postcode" value="GL1 1HX"/>
<input type="submit" value="Do whatever" onclick="javascript:usePointFromPostcode(document.getElementById('postcode').value, function (point) {alert('Latitude: ' + point.lat() + '\nLongitude: ' + point.lng());})" />
</form>
</body>
</html>