1

I've managed to get the users location into an input field but having difficulty editing the address string that shows up. At the moment you'll see HERE Thant it shows Town and Country when I just want it to show Town.

This is the section of script for reference:

request.open(method, url, async);
request.onreadystatechange = function(){
  if(request.readyState == 4 && request.status == 200){
    var data = JSON.parse(request.responseText);
    var address = data.results[5];
      document.getElementById("keyword").value = address.formatted_address;

  }
};

Any advice would be much appreciated. Thanks

0 Answers0