update resource & javascript ajax restful Sample