small update to the js for the view buttons