Moved javascript to href attribute of links

This does not scroll the curent page back to the top when sorting ir switching pages in a table
readded missing table column
use correct variable