Demo Discussion
Forum Config Examples Contributions Vulnerabilities
  Discussion forum about ELOG  Not logged in ELOG logo
icon3.gif   Google Places API AutoComplete, posted by Garret Delaronde on Fri Apr 26 19:00:07 2013 Test_Search.html
    icon2.gif   Re: Google Places API AutoComplete, posted by Stefan Ritt on Fri Feb 21 13:43:03 2014 
Message ID: 67668     Entry time: Fri Feb 21 13:43:03 2014     In reply to: 67480
Icon: Reply  Author: Stefan Ritt  Author Email: stefan.ritt@psi.ch 
Category: Question  OS: Windows  ELOG Version: 2.9.2 
Subject: Re: Google Places API AutoComplete 

Garret Delaronde wrote:

 G'day everyone.

Looking for some input on this idea.

I work for an organization which uses elog extensively for day to day operations.

In several of our logbooks we use a "location" attribute where we would enter an address or intersection.

I am working with the google places api and am able to create the auto complete form in a separate html page, but am interested if anyone has a good direction how i could change the input box into the google map autocomplete search box.

 

I have the code already for the api search box. but when i add it to the config it doesn't really do anything different.

Attached is the html file i setup with the api code.

the autocomplete works great, now i just want it to work in elog.

Any help is much appreciated!

And perhaps the Elog Powers that be might be interested in making it a function down the road? :)

Looks like a nice idea. You can sneak in any JavaScript code into elog pages with the "Top text" option. Like

Top text = <script>window.onload = function() {...}</script>

Then you parse the DOM tree to find your input field for the location, and attache your JS code to it. All the input fields have the "name" attribute in the HTML code set, so it should be easy to find the input field in the DOM tree.

/Stefan

 

ELOG V3.1.5-3fb85fa6