fixed javascript for URL entry