separate html and javascript, added url, works now