modified Javascript in view