Function to get all task id of the tasks displayed in the page