Skip to main content
Question

Looking to hire someone good with code pages for very small, quick project

  • May 10, 2023
  • 0 replies
  • 84 views

Forum|alt.badge.img+16

Anyone good with code pages?

Currently there is a promptandrefresh code page which prompts a user for input (on a non QB page) and then uses that input to update a QB field. This code page works on both desktop and mobile app.

There is also a code page to get the longitude and latitude of the users device, and put those into QB fields. This only works on desktop, or mobile browser but NOT in mobile app. I am trying quite unsuccessfully to see what commands the promptandrefresh uses that allows it to function on mobile app, that the getlonglat is failing with. I do not code and am getting nowhere. 

I need someone to take the current code and modify to work on mobile app, or perhaps build from scratch? Please contact me mtamoush@bbch-llc.com if you think this is a project you could do.

Thanks!



------------------------------
Mike Tamoush
------------------------------

Forum|alt.badge.img+5
  • Quickbase Alumni
  • May 12, 2023

I would assume it is related to how the code page retrieves the lat and long.
It is probably a browser API function not available in the mobile app.
Here's a a simple code page you can create to test just the geolocation API
Copied from here

<!DOCTYPE html>
<html>
<body>

<p>Click the button to get your coordinates.</p>

<button onclick="getLocation()">Try It</button>

<p id="demo"></p>

<script>
var x = document.getElementById("demo");

function getLocation() {
  if (navigator.geolocation) {
    navigator.geolocation.getCurrentPosition(showPosition, showError);
  } else { 
    x.innerHTML = "Geolocation is not supported by this browser.";
  }
}

function showPosition(position) {
  x.innerHTML = "Latitude: " + position.coords.latitude + 
  "<br>Longitude: " + position.coords.longitude;
}

function showError(error) {
  switch(error.code) {
    case error.PERMISSION_DENIED:
      x.innerHTML = "User denied the request for Geolocation."
      break;
    case error.POSITION_UNAVAILABLE:
      x.innerHTML = "Location information is unavailable."
      break;
    case error.TIMEOUT:
      x.innerHTML = "The request to get user location timed out."
      break;
    case error.UNKNOWN_ERROR:
      x.innerHTML = "An unknown error occurred."
      break;
  }
}
</script>

</body>
</html>





------------------------------
Simon H
------------------------------