Hi Richard,
This code will fail;
p_web.GetLocation()
GLO:Latitude = CLIP(p_web.GetSessionValue('_Latitude_'))
GLO:Longitude = CLIP(p_web.GetSessionValue('_Longitude_'))
The call to GetLocation simply adds a bit of javascript code to the outgoing packet. The browser will get that script, execute it, and then send the session values to the server.
So examining the content of the session value immediately after the call would just get the _previous_ value in teh session queue.
If you need the location when on a form then I recommend calling p_web.GetLocation when the form _opens_. This gives the device time to reply before the user clicks the Save button. Incidentally you can also prime fields on the form with the location (see the Priming tab for that.)
Remember all of this is very asynchronous.
cheers
Bruce