quinnygdn Posted March 7, 2022 Report Share Posted March 7, 2022 I have scripts which allow me to collect and post the users GPs co-ordinates (with their permission) which they click on a button which I am working on a single record selected from a report page. I wouold like to be able to update multiple records with these same GPS co-ordinates via the Bulk-Edit facility. We already get a timestamp when they click the button and use a var to post text such as "Bulk-booking" into a specific field (ArrOnStandloc) so the following all works Ok within the button script. var v_TJdriver = "Bulk booking"; var TJdriver = "ArrOnStandloc"; var inputNameTJdriver = "BulkEdit"+ TJdriver; var checkboxNameTJdriver = "Enable"+ inputNameTJdriver + "Ckb"; document.getElementsByName(checkboxNameTJdriver )[0].checked=true; document.getElementById(inputNameTJdriver).value = v_TJdriver; butit returns nothing when i try to make the var v_TJdriver refer to the results of navigator.geolocation using { if (navigator.geolocation) { navigator.geolocation.getCurrentPosition(showPosition); } else { alert ("Geolocation is not supported by this browser."); } function showPosition(position) {v_lat = position.coords.latitude; v_long = position.coords.longitude; var v_TJdriver = v_lat + " / " + v_long }} Not sure if it's a limitation on using Bulk-Edit process or if I need to have an alternative scipt to collect the Lat and Long data in useable form. Any help or pointers would be appreciated. Thanks Quote Link to comment Share on other sites More sharing options...
quinnygdn Posted March 8, 2022 Author Report Share Posted March 8, 2022 Update - Fixed I simply moved the second bit of code relating to the navigator.geolocation to the footer and then referred to v_lat and v_long in the button coding. sorry to have disturbed snyone lookng into it. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.