updated javascript

- failure handlers for POSTs

- better commments

- disable buttons