The demo uses the IOL technique and there is a link in the Pastie record for instrutions.
Where Am I? ~ Add New Recordhttps://haversineconsulting.quickbase.com/db/bnkmdpczc?a=nwrPastie Databasehttps://haversineconsulting.quickbase.com/db/bgcwm2m4g?a=dr&rid=650Notes(1) There really is no need for clicking the button. With a minor modification the script could easily just run as soon as the pages loads and fill in the lat and lon.
(2) Since script will be filling in the latitude and longitude you could arrange for the fields to be readonly so a pesky human could not alter the lat and lon.
(3) There are other ways to implement this so that you don't even need to have the user permit sharing his location.