Create add and update book

you can separate this java-script code to a file since its already long.