Ajax handler for put method