In the Chrome JS Console
"Uncaught SyntaxError: Unexpected end of input"
- When properly indented,our code reads
- We never closed the outer $(function()
- This is what we have:
- What we don't understand and would need some help, it is with the fact that the response has a status 200, then goes to parseJSON but then goes back to checkStatus and throws that error "unexpected end of input" (debugging step by step using the chrome debugger).
- This error is mainly caused by empty returned ajax calls , when trying to parse an empty Json .
- To solve this test if the returned data is empty
- Also, with Google Chrome we can use "pretty print". See the example screenshot below showing jquery.min.js from Stack Overflow nicely indented right from browser