I am working on this widget and mak开发者_如何学JAVAing some progress, but not sure why this new error started happening. Here is the url to see the page and the error in the console:
http://www.comehike.com/outdoors/widget.php?hike_id=108&height=600&width=700
Any idea what is causing this error message and how to fix it?
Thanks!!
I'm not sure if your code has changed since you first posted this a month and a half ago, but I thought I'd mention that this can happen if you're trying to parse invalid JSON from a JSON string via JSON.parse()
I had that happen to me, and I figured out that all the code worked except the JSON.parse() call, which before commented, and after uncommented, gave me this same error. Thus I looked into the contents of the JSON string I was passing to the JSON.parse() call, and found that it was to blame for the error.
Funny thing was, all I really had to do was refresh the page, because somewhere along the line, the JSON string got screwed up, so it just needed to be refreshed. Hope this proves helpful to anyone else running into this issue and might be using JSON.parse() to parse a string of JSON.
精彩评论