<div dir="ltr">Hello All,<div><br></div><div style>I'm using GeoExt 1.1 with a Ext.data.JsonStore and having problems catching the exception event when the server returns a non-200 response. I recognize that it's not strictly a GeoExt problem, but was hoping someone here could help me anyway - hours of research have produced no success.</div>
<div style><br></div><div style>Here's the code:</div><div style><br></div><div style><div>var imageStore = new Ext.data.JsonStore({</div><div><span style="white-space:pre"> </span>root: 'geotiffs',</div><div>
<span style="white-space:pre"> </span>fields: ['value'],</div><div><span style="white-space:pre"> </span>baseParams: {<br></div><div><span style="white-space:pre"> </span>date: date</div><div><span style="white-space:pre"> </span>},<br>
</div><div><span style="white-space:pre"> </span>proxy:new Ext.data.ScriptTagProxy({</div><div><span style="white-space:pre"> </span>url:'<a href="http://devel.ngdc.noaa.gov/mapviewer-support/viirs_thailand/images">http://devel.ngdc.noaa.gov/mapviewer-support/viirs_thailand/images</a>',</div>
<div><span style="white-space:pre"> </span>listeners: {</div><div><span style="white-space:pre"> </span>//TODO not working</div><div><span style="white-space:pre"> </span>'exception': function(proxy, type, action, options, response) {</div>
<div><span style="white-space:pre"> </span>console.log('loading exception: ');</div><div><span style="white-space:pre"> </span>}</div><div><span style="white-space:pre"> </span>}</div><div>
<span style="white-space:pre"> </span>})</div><div>});</div><div><br></div><div style>When the server returns a 404, an error is immediately printed in the console, but the function above doesn't fire until the default timeout has elapsed.</div>
<div style><br></div><div style>Can someone please help me?</div><div style><br></div><div style>Thanks!</div><div style><br></div><div style>--john</div><div style><br></div></div></div>