finished inventory update javascript and ajax