<form action="script.php" method="POST" onsubmit="FormSubmit(this);return false">
<input type="text" name="test" />
<button type="submit">Отправить</button>
<div class="success" style="display:none">Отправлено</div>
<div class="error" style="display:none">Ошибка</div>
</form>
function FormSubmit(form){
$(form).find('.success').hide();
$(form).find('.error').hide();
$.post('script.php', $(form).serialize(), function(data){
if(data == '1') $(form).find('.success').show(); return true;
$(form).find('.error').show();
});
}
<link rel="image_src" type="image/jpeg" href="http://s1.dmcdn.net/PKiEm.jpg" />
<link rel="thumbnail" type="image/jpeg" href="http://s1.dmcdn.net/PKiEm.jpg" />
<link rel="alternate" type="application/json+oembed" title="Прикол. Кот - нянька убаюкивает плачущего ребенка" href="http://www.dailymotion.com/services/oembed?url=http%3A%2F%2Fwww.dailymotion.com%2Fvideo%2Fx3b96sa_%25D0%25BF%25D1%2580%25D0%25B8%25D0%25BA%25D0%25BE%25D0%25BB-%25D0%25BA%25D0%25BE%25D1%2582-%25D0%25BD%25D1%258F%25D0%25BD%25D1%258C%25D0%25BA%25D0%25B0-%25D1%2583%25D0%25B1%25D0%25B0%25D1%258E%25D0%25BA%25D0%25B8%25D0%25B2%25D0%25B0%25D0%25B5%25D1%2582-%25D0%25BF%25D0%25BB%25D0%25B0%25D1%2587%25D1%2583%25D1%2589%25D0%25B5%25D0%25B3%25D0%25BE-%25D1%2580%25D0%25B5%25D0%25B1%25D0%25B5%25D0%25BD%25D0%25BA%25D0%25B0_animals&format=json" />
<link rel="alternate" type="application/xml+oembed" title="Прикол. Кот - нянька убаюкивает плачущего ребенка" href="http://www.dailymotion.com/services/oembed?url=http%3A%2F%2Fwww.dailymotion.com%2Fvideo%2Fx3b96sa_%25D0%25BF%25D1%2580%25D0%25B8%25D0%25BA%25D0%25BE%25D0%25BB-%25D0%25BA%25D0%25BE%25D1%2582-%25D0%25BD%25D1%258F%25D0%25BD%25D1%258C%25D0%25BA%25D0%25B0-%25D1%2583%25D0%25B1%25D0%25B0%25D1%258E%25D0%25BA%25D0%25B8%25D0%25B2%25D0%25B0%25D0%25B5%25D1%2582-%25D0%25BF%25D0%25BB%25D0%25B0%25D1%2587%25D1%2583%25D1%2589%25D0%25B5%25D0%25B3%25D0%25BE-%25D1%2580%25D0%25B5%25D0%25B1%25D0%25B5%25D0%25BD%25D0%25BA%25D0%25B0_animals&format=xml" />
<img src="http://pics.avs.io/200/200/<?= $xml->offer[12]['airline_code']?>.png" />
http://mt2.google.com/vt/v=w2.106&x=40920&y=24398&z=16&s=&lyrs=m@1448924743,traffic%7Cseconds_into_week:-1&opts=T&apistyle=p.v%3Aoff
overlay = new google.maps.OverlayView();
overlay.draw = function() {};
overlay.setMap(map);
$('#map-canvas').click(function(event){
var point = new google.maps.Point(event.pageX,event.pageY);
var location = overlay.getProjection().fromContainerPixelToLatLng(point); //получаем координаты по значениям X,Y клика
var request = {
location: location,
types: ['bus_station','subway_station'], //нам нужны только автобусные остановки, и метро
radius: 10,
};
placesService = new google.maps.places.PlacesService(map);
placesService.search(request, function(result, status, pagination){ //ищем по близости объект по координатам, в 10 метрах от клика
station = result[0];
if(typeof station != 'undefined'){
pos = station.geometry['location'];
bus_no = station.name.match(/\[([0-9]+)\]/i)[1]; //получаем ID автобусной остановки, он обычно среди []
alert(bus_no); // А вот и наша остановка
}
});
});