updated js for final view detail