so if I understand you right, you have a form of some kind which a user will fill out and hit a submit button.
Jared
...
not quite... Let me try to explain a bit better:
The application is a simple GPS tracker. The elements are a device that combines a GPS chipset and a 2-way programmable alphanumeric pager. The pager can send a string in which its current latitude and longitude coordinates are encoded. I have it set to automatically send pages every 5 minutes whenever it is moving. The pages are automatically processed by the pager network service, converted and sent on as emails. I then get an email in my gmail account with a body containing a string like:
A3402.40611712.29122514400
which means:
Lat:34deg 02.40min
Long: -117deg 12.291min
time stamp: 22:51:44
So that's the source of the data. There are no forms or submit buttons or really any user input at all on this side.
At the webpage, there is a Javascript page with the following code:
http://tgmcnaughton.googlepages.com/map2.htm
-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-
<html xmlns="http://www.w3.org/1999/xhtml">
-
<head>
-
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
-
<title>Google Maps JavaScript API - tgm version 1.0</title>
-
<script src="http://maps.google.com/maps?file=api&v=2&key=abcdefg"
-
type="text/javascript"></script>
-
<script type="text/javascript">
-
//<![CDATA[
-
-
var lat = 34.232487;
-
var lon = -117.247165;
-
var point = new GLatLng(lat,lon);
-
-
function load() {
-
if (GBrowserIsCompatible()) {
-
var map = new GMap2(document.getElementById("map"));
-
map.setCenter(new GLatLng(lat,lon), 13);
-
map.addControl(new GSmallMapControl());
-
map.addControl(new GMapTypeControl());
-
map.addOverlay(new GMarker(point));
-
}
-
}
-
-
//]]>
-
</script>
-
</head>
-
-
<body onload="load()" onunload="GUnload()">
-
<div id="map" style="width: 800px; height: 500px"></div>
-
</body>
-
</html>
-
I want to replace line 12 and 13 with code that will do the following:
login to my gmail account
find the latest email message
open the message
copy the bodytext into a string variable.
parse the string into lat and lon and time
update the two variables lat and lon with the current position of the pager.
Remember, the gmail account is just continuously receiving updates with new location strings. When the page is accessed, I want it to automatically go out and get an updated location.
Does this make sense?
Thanks,
Tim