updating javascript and html syntax