payscale / country-currency-map

Mapping of countries and their primary currency.
Apache License 2.0
22 stars 15 forks source link

How do I fix the Module errors "SCRIPT1086: SCRIPT1086: Module import or export statement unexpected here" and " SCRIPT5007: SCRIPT5007: Unable to get property 'getCurrencyAbbreviation' of undefined or null reference scripts.js (75,41)"? #11

Closed DragonOsman closed 6 years ago

DragonOsman commented 6 years ago

As the title says, I have the errors "SCRIPT1086: SCRIPT1086: Module import or export statement unexpected here" and " SCRIPT5007: SCRIPT5007: Unable to get property 'getCurrencyAbbreviation' of undefined or null reference scripts.js (75,41)" coming up in my browser console.

In my current project, I have a Google Map centered on the user's location where an info window opens up on said location. The info window displays an HTML form (generated in Javascript) that submits to the backend code and which takes an amount as USD (currency API free plan doesn't allow changing the base currency, which is USD), has two dropdown menus for the "from" and "to" currencies, and a submit button. Aside from the map, I'm also using the Geocoder API from Google.

So the expected result on the GUI would be the "from" currency dropdown having USD selected by default and the dropdown itself being disabled, and the "to" currency having the currency of the user's current location selected by default. What I have is both dropdowns having AED selected and the first dropdown not disabled.

My current Javascript code is as shown in this Gist (aside from me not showing the actual App ID here): https://gist.github.com/DragonOsman/c6e8fb15343544e662f474c5a526d1c2 and my index.html is like this: https://gist.github.com/DragonOsman/506bd2bae1dfe4c03a4bbe2a6d830324 . So how do I fix this?

Thanks in advance for any replies and/or help.

DragonOsman commented 6 years ago

Never mind on this. Not needed anymore.