removed javascript function causing error to be raised