NetTalk Central

NetTalk Web Server => Web Server - Ask For Help => Topic started by: debzidoodle on April 10, 2014, 04:17:04 PM

Title: Address Auto Complete in Popup Form Issue
Post by: debzidoodle on April 10, 2014, 04:17:04 PM
Hello

I am wanting to auto complete addresses using google places.  I have the attached example app and js file... and the auto complete opens like it should if I am not in a pop up form, but I want to have this option if I am coming off a map, which is only popups...  what do I need to change in this app to make the auto complete work with a popup form?

Thanks

Debra

[attachment deleted by admin]
Title: Re: Address Auto Complete in Popup Form Issue
Post by: debzidoodle on April 15, 2014, 05:58:38 AM
Any suggestions for this popup form issue?
Title: Re: Address Auto Complete in Popup Form Issue
Post by: Bruce on April 16, 2014, 12:33:47 AM
Hi Debra,

I moved the js file into \web\scripts
but I'm not sure what to d next to test. I went to the Google Places autoComplete menu item, then to Link. I typed in my address, but it doesn't seem to do anything.
Perhaps it only works on US addresses?
what sort of address should I type in the entry field?

cheers
Bruce
Title: Re: Address Auto Complete in Popup Form Issue
Post by: debzidoodle on April 16, 2014, 05:20:57 AM
It searches google places, so it should be worldwide.  Attached is what the screen shot looks like when the auto complete is open.  The auto complete only works correct on the link page. On the popup page it does not show the auto complete drop list, but if you use your down arrows it will move through the results, so its doing the lookup to google, its just not showing the results like it should.

[attachment deleted by admin]
Title: Re: Address Auto Complete in Popup Form Issue
Post by: Bruce on April 22, 2014, 12:04:42 AM
Hi Debra,

the short answer is that the code you posted is build for a very static page, and it simply doesn't handle "dynamic" fields (ie fields that come and go) very well.

It doesn't even do the one on the "page" in your example well. It works only as the page opens. If you then enter a partial address, move to another field, and come back to the first field it has stopped working.

The longer answer is that this would need to be wrapped in a jQuery UI widget to make it properly useful. I can't do that today, but I've added it to the list.

cheers
Bruce

Title: Re: Address Auto Complete in Popup Form Issue
Post by: debzidoodle on April 22, 2014, 04:29:07 AM
Cool, thank you Bruce!