NetTalk Central

Author Topic: Couple of problems with GetLocation  (Read 2873 times)

jlavera

  • Newbie
  • *
  • Posts: 47
    • View Profile
    • Email
Couple of problems with GetLocation
« on: January 22, 2013, 05:04:12 AM »
Hi, all.

Using Clarion 8 9304 v6 - ABC
Nettalk 6.46  - Mobile Android 4

Problem 1)

I tried to use p_web.GetLocation() into a "NetWebPage", it is called from a button from a "NetWeForm", but it doesn't seems to work, it never returns the Location Data. However, it always seem to work properly IF i put the p_web.GetLocation() into "Index" page.
I need run the p_web.GetLocation() when the user click on a button...  Is there a problem why this can't be so?

Problem 2)

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?

Thank you in advance.
Jorge Lavera

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11244
    • View Profile
Re: Couple of problems with GetLocation
« Reply #1 on: January 22, 2013, 11:02:19 PM »
>> 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

jlavera

  • Newbie
  • *
  • Posts: 47
    • View Profile
    • Email
Re: Couple of problems with GetLocation
« Reply #2 on: January 23, 2013, 08:58:04 AM »
I'm sorry, but I don't get it.

I'm in a webForm. Among other regular entry data entered by the user, I need the Location of the mobile device.
How do I get it?

Thank you in advance.

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11244
    • View Profile
Re: Couple of problems with GetLocation
« Reply #3 on: January 23, 2013, 10:01:27 AM »
I'd need to make a new form field type so you can get the location data submitted with the form data.
That won't make it into 7.03, but I'll put it on the list.

cheers
Bruce