>> I need run the p_web.GetLocation() when the user click on a button
You don't need to call a page, just set the JavaScript for the button to be
'getLocation()'
remember case is important when using JavaScript.
>> The p_web.GetLocation() function seems work in asynchronous mode (or am I wrong?), so, how can I make a "wait" until the Location data arrives , for then save into a file?
you're thinking about this backwards.
The user is looking at the browser, and clicks on a button. The location data is then sent to the server. It'll arrive "out of nowhere" as it were (in the case you're setting up here, the server doesn't even know the user clicked on the button).
So rather, when it arrives, whenever it arrives, you just handle it however you want.
cheers
Bruce