Unstable code and inconsistent behavior
I'm running a code page from a button-triggered Rich Text formula field, which I pirated from Kirk Trachy's video. The code is mainly run from the user's mobile device and it captures their current GPS coordinates and current time, and then updates form fields with these data elements. The code works, but it seems unstable. It works better on a wifi connection than it does on the device's network (inconsistent results with Verison, doesn't work at all with T-Mobile, and works every time with Xfinity) Sometimes the button needs to be hit a few times, and sometimes it will redirect to the home page, or gets hung on the "Processing" page. I'm including the code page as an attachment and a screenshot of the Rich Text formula. I would appreciate any insight into how this can be made to be more robust.
------------------------------
Barry Dolan
------------------------------