JS on Index and Table