Get JavaScript demo to work