Added the table header in js function