js to handle inline status changes