Yii Framework Forum: Google Address Autocomplete With Cjuiautocomplete - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Google Address Autocomplete With Cjuiautocomplete Rate Topic: -----

#1 User is offline   kokoseq 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 17
  • Joined: 08-November 12

Posted 29 March 2013 - 07:06 PM

I would like to impletement address autocomplete on my site. I have tries some solutions, but no meets my requirements - they always return addresse in wrong format (I need street_name street_number city postal_code). I would like to use CJuiAutoComplete widget and this is my idea:

1. User starts to type. After 3 characters, the widget calls actionAjaxRequest action in some controller
2. controller calls google api, gets results and provide them to CJuiAutoComplete in a form I want
3. User can choose from offered options

Now my problem is - how to do api ajax call from the controller? is it even possible? if not, how would you do it other way? Thanks for any help
0

#2 User is offline   redguy 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 771
  • Joined: 02-July 10
  • Location:Central Poland

Posted 30 March 2013 - 03:50 AM

what do you mean by "how to do api ajax call from the controller"? if you want to call remote http service from PHP code - you can simply use CURL, file open wrappers, etc...
red
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users