update js attempt previous button
altered ruby