Is it possible to get GeoLocation for mobile form?

Is it possible to get GeoLocation for mobile form?

I am trying to create a custom app where we record the geolocation on submit. I have been able to get user IP, latitude, longitude and submit with form. However, IP is not very accurate. 

Here's what I"m using:

IPAddress=zoho.ipaddress;
User=zoho.loginuser;
location = getUrl("http://freegeoip.net/xml/");
Latitude = location.executeXPath("/Response/Latitude/text()");
Longitude = location.executeXPath("/Response/Longitude/text()");

I would like to use something like this from client-side:
if (navigator.geolocation) {
 
var timeoutVal = 10 * 1000 * 1000;
  navigator
.geolocation.getCurrentPosition(
    displayPosition
,
    displayError
,
   
{ enableHighAccuracy: true, timeout: timeoutVal,maximumAge: 0 }
 
);
}
else {
  alert
("Geolocation is not supported by this browser");
}


function displayPosition(position) {
  alert
("Latitude: " + position.coords.latitude + ", Longitude: " + position.coords.longitude);
}
Not sure if this kind of client-side interaction is even support in zoho creator. 

Here's a demo:
http://html5demos.com/geo


Somehow making this work will dictate whether I can use Zoho or not. 

Any help is much appreciated.