Hi,
I'm currently designing a form that will allow users to move a marker and get a position of a small area and place a marker and then save the latitude and longitude.
I used this thread as an idea https://answers.laserfiche.com/questions/77786/Custom-HTML-how-to-Hold-or-freeze-an-custom-HTML-active-script-when-submitting-
In my example I save the latitude and longitude from the previous step and I grab it from the text boxes which works fine in the second step when the reviewers get to the form and they can see the updated area, the issue is when it gets approved and saved into the repository for a second time the google maps fails to load and I just get a blank page.
Anyone have any ideas?
window.onload=function(){ var lat = document.getElementById("Field31").value; var long = document.getElementById("Field43").value; var map; function initialize() { var myLatlng = new google.maps.LatLng(58.2020, 6.393838); var myOptions = { zoom: 17, center: myLatlng, mapTypeId: google.maps.MapTypeId.SATELLITE }; map = new google.maps.Map(document.getElementById("q40"), myOptions); var marker = new google.maps.Marker({ draggable: true, position: myLatlng, map: map, title: "Your location" }); google.maps.event.addListener(marker, 'dragend', function (event) { document.getElementById("Field31").value = event.latLng.lat(); document.getElementById("Field43").value = event.latLng.lng(); infoWindow.open(map, marker); }); } google.maps.event.addDomListener(window, "load", initialize()); }//]]>