success: function(data) {
var data = jQuery.parseJSON(data);
if (data.result==1) {
h=$('.addons').html();
$('.addons').html(h+data.txt);
}
}
var today = new Date();
var dd = today.getDate();
var mm = today.getMonth()+1; //January is 0!
var yyyy = today.getFullYear();
if(dd<10) {
dd='0'+dd
}
if(mm<10) {
mm='0'+mm
}
$.getJSON('ссылка?today='+dd+'.'+mm+'.'+yyyy,{},function (data) {
var autocomplete;
function initialize(country) {
var options = {
language: '<?=$current_lang?>',
types: ['(cities)'],
//Выбор страны
componentRestrictions: {country: country}
};
var input = document.getElementById('searchTextField');
autocomplete = new google.maps.places.Autocomplete(input, options);
autocomplete.addListener('place_changed', insertCityAndZone);
}
function insertCityAndZone(){
var place = autocomplete.getPlace();
}