Sathish Kumar k k
Sathish Kumar k k

Reputation: 1842

jquery append not working for creating html table

representation of my json data from arraList

var data = [{"analystNo":"","batch_name":"","can":"","curator":"kandasamy",
  "curator_status":"Available","current_login":"","qc":"",
  "qc_status":"","role":"","tan":"17264639U","worker":""},{"analystNo":"","batch_name":"","can":"","curator":"bramma",
 "curator_status":"Available","current_login":"","qc":"",
 "qc_status":"","role":"","tan":"17580309X","worker":""},{"analystNo":"","batch_name":"","can":"","curator":"abc",
 "curator_status":"Available","current_login":"","qc":"abc",
 "qc_status":"Available","role":"","tan":"17671633K","worker":""}]

jquery

var insert="";

for(var i=0;i<data.length;i++){
    insert += "<tr><td>"+data[i].tan+"</td><td>"+data[i].curator+"</td><td>"+data[i].curator_status+"</td><td>"+data[i].qc+"</td><td>"+data[i].qc_status+"</td></tr>" ;
}
alert(insert);
$('#tableID').append(insert);

inside html body

<table id='tableID' border="2">
<table>

i tested this here but not working. i think i miss something some where.

Upvotes: 0

Views: 315

Answers (1)

digitebs
digitebs

Reputation: 852

change the framework dropdown on the left pane from mootools to jquery 1.7.1.

Upvotes: 3

Related Questions