Updating JS for draw page