$('form').submit(function(e){
e.preventDefault();
data = new FormData(this);
xhr = new XMLHttpRequest();
xhr.open( 'POST', '/url', true );
xhr.onreadystatechange = function ( response ) {
if (xhr.readyState == XMLHttpRequest.DONE) {
console.log(xhr.responseText);
}
};
xhr.send( data );
});
function get_client_ip() {
$ipaddress = '';
if (isset($_SERVER['HTTP_CLIENT_IP']))
$ipaddress = $_SERVER['HTTP_CLIENT_IP'];
else if(isset($_SERVER['HTTP_X_FORWARDED_FOR']))
$ipaddress = $_SERVER['HTTP_X_FORWARDED_FOR'];
else if(isset($_SERVER['HTTP_X_FORWARDED']))
$ipaddress = $_SERVER['HTTP_X_FORWARDED'];
else if(isset($_SERVER['HTTP_FORWARDED_FOR']))
$ipaddress = $_SERVER['HTTP_FORWARDED_FOR'];
else if(isset($_SERVER['HTTP_FORWARDED']))
$ipaddress = $_SERVER['HTTP_FORWARDED'];
else if(isset($_SERVER['REMOTE_ADDR']))
$ipaddress = $_SERVER['REMOTE_ADDR'];
else
$ipaddress = 'UNKNOWN';
return $ipaddress;
}
$post->IP = get_client_ip()
.content_item:nth-child(odd) div:nth-child(2):after {
content: "";
display: inline-block;
position: absolute;
right: -11px;
top: 50%;
margin-top: -11px;
min-width: 20px;
min-height: 20px;
border-radius: 50%;
background: rgb(177, 177, 174);
}
.content_item:nth-child(even) div:nth-child(1):before {
content: "";
display: inline-block;
min-width: 20px;
min-height: 20px;
border-radius: 50%;
background: rgb(177, 177, 174);
position: absolute;
left: -11px;
top: 50%;
margin-top: -11px;
}
section.content_item {
position: relative;
}
<script>
var data5 = [{
data: [<?=coords?>],
label: 'Депозиты',
points: {
show: true,
radius: 6
},
splines: {
show: true,
tension: 0.45,
lineWidth: 5,
fill: 0
}
}
......
</script>