Update JS commands for next \& prev