Cannot execute JS query.where statement - mime type error?

785
2
07-06-2017 08:45 AM
MKF62
by
Occasional Contributor III

I'm trying to update a web app we have and when I change the query.where statement to acquire more states, I get a mime type error in the development tool consoles of multiple browsers.

This is the current query.where statement and it renders the map just fine:

query.where = "STATE_ABBR = 'GA' OR STATE_ABBR = 'IA' OR STATE_ABBR = 'KY'"

I'd like to add more states to the where statement like so:

query.where = "STATE_ABBR = 'GA' OR STATE_ABBR = 'IA' OR STATE_ABBR = 'KY' OR STATE_ABBR = 'MO'"

Unforunately, when I change this in notepad ++, save the new html file, and refresh in the browser to the see the results, I get this error in the development tool console:

"Refused to execute script from <myURLhere> because its MIME type (text/plain) is not executable, and strict MIME type checking is enabled."

I'm very unclear as to why the current map renders fine, but if I change the query it breaks. I don't know what MIME types are or how to fix such an issue. Insight would be appreciated.

0 Kudos
2 Replies
RobertScheitlin__GISP
MVP Emeritus

Molly,

   When woring with one field and multiple values you can optimize your query by using:

query.where = "STATE_ABBR IN ('GA','IA','KY','MO')"

Why you are getting a Mime error, I can not say unless I see your code.

0 Kudos
MKF62
by
Occasional Contributor III

Thanks, I figured that out recently  

We also fixed the most recent issue concerning the mime error. It had to do with our editing software; needed to switch to Dreamweaver because for some reason it didn't appreciate that I was editing on my local file in Notepad++

0 Kudos