I have a simple online form with jQuer开发者_StackOverflowy calling a JSON file containing a list of countries. The page populate a select list and works fine offline but not online. You can see the HTML source code at
http://governapps.com/qualys/index.cfm
The jQuery code is at the bottom.
Any idea why this isn't working?
Thanks,
David
Your iso-3166-countries.en.json
url is wrong or it can't be served correctly (mime types, permissions, etc).
If the url is right, an easy way would be to rename it to iso-3166-countries.en.cfm
, and of course change the $.getScript
to reflect it to.
Hope this helps
It seems like iso-3166-countries.en.json is not being served correctly in IIS (maybe .json MIME is not defined in your IIS) or the relative path to it is not correct; Because it just throws error 404 (resource not exists error).
精彩评论