As an extension question that Felix Kling answered so brilliantly I now need to do a two part check on the data table deployed.
Can anyone tell me how to add to the code below to allow me not only to copy the values of the pcode fields into an array but to check if there is a check in the checkbox with a corresponding row number i.e. route2 is check then add to the array but if route3 is not checked then exclude it.
function GetRoute() { var from = document.getElementById('inpAddr').value; var locations = [from]; for(var i = 2; i <= 400; i++) { var element = document.getElementById('pcode' + i); if(element === null) { break; } locations.push(element.innerHTML); } var options = new VERouteOptions(); options.DrawRoute = true; options.RouteColor = new VEColor(63,160,222,1); options.RouteWeight = 3; options.RouteCallback = onGotRoute; options.SetBestMapView = true; options.DistanceUnit = VERouteDistanceUnit.Mile; options.ShowDisambiguation = true; map.GetDirections(locations,options); } Thanks in advance!
Justin