function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Aruna VasahanAruna Vasahan 

Appending table inside div tag using jquery dynamically

Hi guys,
          My Aim is to append the table with div tag and to display the output using jquery. For that
          I have in my component
<div id="dTable"></div> // I need to append my table with this div 
In my controller
var Obj = JSON.parse(response.getReturnValue());
                   
          $('#dTable').append('<table id="data">' );
                 $('#data').append("<tr><th>"Type"</th><th>"Industry"</th><th>"Rating"</th></tr>");
                $('#data').append("<tr><td>"+Obj.Type+"</td><td>"+Obj.Industry+"</td><td>"+Obj.Rating+"</td></tr>");
              table</td></tr></table>"
                     $('#dTable').append( '</table>' );

Can anyone identify what is wrong with my code.

Thanks
Aruna

 
Aruna VasahanAruna Vasahan
Guys,
       Please ignore line no.6 in controller code.
Thanks