Table gets data

Exchanged link <a href=...> with a button so it does not refresh the
page and the data makes it to the table. Organized the javascript.