I am a beginner and I would need help. I have an aspx page which has a table inside there is a div tag as shown below:
<div id="divAcademicFields" class="inside">
<!--<%= RenderAcademicFields() %> this was server side code and commended as I want to use client now -->
</div>
I also have a Jquery block on the same page:
<script type="text/javascript">
$(document).ready(function () {
// get academic fields in a raw data
$.getJSON('http://services.corp.com/app/academics/?format=json', function(data){
var custhtml = "";
$.each( data, function(key, value) {
var temp = key;
var temp2 = value;
custhtml += "<input type=checkbox value=" + temp + " /><label> " + temp2 + "</label><br />"
//alert( key + ": " + value );
});
$("divAcademicFields").append(custhtml);
});
</script>
The service returns all raw data correctly and I verified. How to display format the row html from JSON and display inside the <div>?
The html should be displayed something similar to the screen
Please assist.