I am trying to split the Ajax response in two separate Div. I am getting the response in a single Div. Please see the code
$(document).ready(function() {
$.post("check.php", {
job: exactdatainner,
attrb: getattr
},
function(data, status) {
alert("Data: " + data + "
Status: " + status);
var obj = data.split('||');
$(".job").html(obj[0]);
$(".attribute").html(obj[1]);
});
});
<div class="job"></div>
<div class="attribute"></div>
<?php
$job = $_POST['job'];
$attrb = $_POST['attrb'];
echo $job;
echo $attrb;
?>
I am getting the result but all the result printing inside first div only Here is the PHP code
</div>