Goodday Everyone, I hope someone can assist out there...we have created a GEO Locate button, whcih captures the Current User Location and also update a date field. When we test the button on desktop, it works perfectly, but it doesnt want to work on mobile. Can anyone assist in having a look at our code?
Current Button Code:
If([Start_Latitude] = null and [Start_Longitude] = null,
"javascript:" &
"var QBU_recid="& [Record ID#] & ";" &
"void([login to view URL]('" & URLRoot() & "db/bniyztgvg?act=dbpage&pagename=[login to view URL]'));",
"javascript: alert('A location for this drop has already been captured.');")
&
If([Start_Latitude] <> null and [Start_Longitude] <> null, "javascript:DoSaveAdd()")
Current Javascript Page:
jQuery(document).ready(function getLocation()
{
if ([login to view URL])
{
[login to view URL](showPosition);
}
var test = $.ajax({url: url,async:false,success: pushResult}).responseText;
return false;
});
function showPosition(position){
//alert("insertGeo Running!");
var dateNow = new Date();
var cdate = ('0' + [login to view URL]()).slice(-2) + '-' + ('0' + ([login to view URL]()+1)).slice(-2) + '-' + [login to view URL]() + ' ' + [login to view URL]() + ':' +([login to view URL]() < 10 ? "0" : "" ) + [login to view URL]();
//edit record
var editURL = "";
editURL = "bniyztgvg";
editURL += "?act=API_EditRecord&key=" + QBU_recid;
[login to view URL] = [login to view URL];
[login to view URL] = [login to view URL];
[login to view URL] = cdate;
addURL += "&apptoken=n8wdqec5bzncectj7v7edp8ad9x";
$.ajax({url: editURL,async:false});
[login to view URL](true);
}
did you try logging into an alert? also, did you try creating a callback function for error logging? in theory, it should work on the mobile version too, but it needs user permission to use the location. I can check it out for you but I think your first mistake is not to have error handling anywhere..
Best regards
Oscar
Hello, How are you? We are a team and we have understood about your work what you exactly want. We just saw your project description carefully. We are very interested in your project. We have rich experience in web, app development and design. We can start your project immediately. We would like to discuss about your project with you via chat. Please send your message so that we can discuss about your project.
We can develop custom modules and themes that follows the modern standards while keeping the security and sustainability of the system.