another way to do this is using the gears API!

here's an example!

Code: 
var p = {};
function geofind(successCallback, errorCallback)
{
	try
	{
		navigator.geolocation.getCurrentPosition(successCallback, errorCallback,
		{
			maximumAge: 600000
		});
	}catch(e)
	{
		try
		{
			var geolocation = {};
			geolocation = google.gears.factory.create('beta.geolocation');
			geolocation.getCurrentPosition(successCallback, errorCallback);
		} catch(e)
		{
			try
			{
				p.coords = google.loader.ClientLocation;
				successCallback(p);
			}catch(e)
			{
				errorCallback({
					message: "No Geolocation providers found"
				});
			}
		}
	}
}
and use like so:

Code: 
geofind(function(result)
	{
		//Success
		$.post('set_geo_location.php',{result},function(){
			//ask the user to reload the page as you now have a geo-location in $_SESSION
		});
	},
	function(error)
	{
		//Error
	}
);