Is it possible to create the table in a javascript function

Is it possible to create the table in a javascript function

smilesprowersmilesprower Posts: 6Questions: 4Answers: 0

I am new to all this stuff so bare with me.

What I am looking to do is to create the data table inside a function that gets called when the inner.html is changed.

function loadHTML(){
// I need to dynamically create the table here
}

Thanks

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 61,867Questions: 1Answers: 10,136 Site admin
    Answer ✓

    You would need to call the function after you change the HTML, but the is no reason why you can't just call $().DataTable() inside that function.

    Allan

  • smilesprowersmilesprower Posts: 6Questions: 4Answers: 0

    Thanks a mill.

This discussion has been closed.