Added js to add rows and db save functionality