Note that there are some explanatory texts on larger screens.

plurals
  1. POExtJS - SyntaxError: missing ) in parenthetical
    text
    copied!<p>I am writing some code to educate myself in the ways of ExtJS. I am also new to JSON so hopefully this question will be easy for you to answer. I am trying to retrieve some data from a basic web service that I have written which <em>should</em> be returning its results as JSON (seeing as I am new to JSON - it could be that that is broken).</p> <p>The error I am getting is </p> <blockquote> <p>SyntaxError: missing ) in parenthetical</p> </blockquote> <p>The JSON that I am returning from my web service is</p> <pre><code>{ "rows": [ { "id": "100000", "genre_name": "Action", "sort_order": "100000" }, { "id": "100002", "genre_name": "Comedy", "sort_order": "100002" }, { "id": "100001", "genre_name": "Drama", "sort_order": "100001" }] } </code></pre> <p>My ExtJS code is as below. The <code>loadexception</code> callback is where I have retrieved the JSON and error above from</p> <pre><code>var genres = new Ext.data.Store({ proxy: new Ext.data.HttpProxy({ method: 'POST', url: 'http://localhost/extjs_training/Demo_WebService/Utility.asmx/GetGenres', failure: function(response, options){ Ext.get('my_id').dom.innerHTML = 'Load failed: ' + response.status; } }), reader: new Ext.data.JsonReader({ fields: ['id', 'genre_name'], root: 'rows' }), listeners: { loadexception: function (proxy, options, response, e) { var result = response.responseText; Ext.MessageBox.alert('Load failure', e + " ..... " + result); } } }); var loadSuccess = genres.load({ callback: function(r, options, success){ Ext.get('my_id').dom.innerHTML = 'Load status: success=' + success; } }); </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload