The following function will allow you to add div below a parent div
function Iteratejsondata(HfJsonValue) {
var jsonObj = eval('(' + HfJsonValue + ')');
for (var i = 0, len = jsonObj.Table.length; i < len; ++i) {
var employee = jsonObj.Table[i];
$('<div class="resultsdiv"><br /><span id="EmployeeName" style="font-size:125%;font-weight:bolder;">' + employee.Emp_Name + '</span><span style="font-size:100%;font-weight:bolder;padding-left:100px;">Category :</span> <span>' + employee.Desig_Name + '</span><br /><br /><span id="SalaryBasis" style="font-size:100%;font-weight:bolder;">Salary Basis :</span> <span>' + employee.SalaryBasis + '</span><span style="font-size:100%;font-weight:bolder;padding-left:25px;">Salary :</span> <span>' + employee.FixedSalary + '</span><span style="font-size:100%;font-weight:bolder;padding-left:25px;">Address :</span> <span>' + employee.Address + '</span></div>').insertAfter('#ResultsDiv');
//document.write(employee.Emp_Name);
}
}
No comments:
Post a Comment