JavaScript addition for the representation page