Added URL error functionality
Updated the type of the javascript