you have the following embed code;
p_web.Script('getLocation()')
p_web.SSV('LOC:Latitude',p_web.GSV('_Latitude_'))
p_web.SSV('LOC:longitude',p_web.GSV('_Longitude_'))
the problem is that you're thinking very synchronously here.
the first line;
p_web.Script('getLocation()')
is an instruction to the browser to run a Javascript function called getLocation.
I'll only _send_ this script when the request completes, so the next 2 lines are useless here.
hence the need to press the button multiple times...
cheers
Bruce