Wow -- thanks VERY MUCH from me also hendricd -- your code makes session timeouts a breeze to handle.

In my application, I simply included "ext-basex-min.js" as described above, and then added a single call to Ext.lib.Ajax.onStatus(...) also as described above. This works very great for handling session timeouts reported by my server-side code.

However, please note the following bug and (hopefully sound) fix I implemented. My code is far too large to post here, but I'll describe the problem as best I can.

My application contains a GridPanel populated by a JsonStore. User clicks on other elements on the screen trigger the JsonStore (and therefore the GridPanel) to reload with applicable data from the server. It's very possible for a user to trigger the reloading of the JsonStore before a previous load was completed. This worked fine without the "ext-basex-min.js" in my app, but including that file (without even calling anything in it) caused IE6 & 7 to trigger a JavaScript error in this situation. Firefox still worked fine though.

My fix involves moving a single line of code into an existing try/catch block as indicated in these snippets.

Further, could you post the handler used to call the store.load? Was it called asynchronously?

Was: Ext.lib.Ajax.forceActiveX == true ??

Thanks.

The message in IE is the usual "Problems with this Web page might prevent it from being displayed properly....." popup with the following details:

Line: 236
Char: 9
Error: Unspecified error.
Code: 0
URL: 'myurl'

Note that I isolated the cause of the problem to simply including either "ext-basex.js" (or "ext-basex-min.js") via a <script> tag in my source HTML file (even without actually calling Ext.lib.Ajax.onStatus(...) or referencing any other code in your extension), so Ext.lib.Ajax.forceActiveX was untouched.

As for my JsonStore-related code, my code only ever calls JsonStore.reload() (not .load()). Yup, the calls are asynchronous, and the problem occurred when a second ajax request was sent by the JsonStore while a previous request was still outstanding (the first response was not yet fully received).

For posterity, here's a simplified version of my JsonStore instantiation code -- simplified only by shortening the values assigned to the config options (those are all of the config options I use). I also do some screen-only cosmetic stuff in the event handlers shown (no ajax stuff).

A supplementary note to my above post -- I tried a couple more tests with your original version of "ext-basex.js". Explicitly setting Ext.lib.Ajax.forceActiveX to either true or false has no impact on the problem I described -- it still occurs in both cases. Note however that in my real application, I do not change its default value.

ext-basex Updated 2.2

ext-basex Updated 2.2

The update corrects a problem reported with the current ext-base adapter implementation.
When passing postable content (jsonData, xmlData), the Content-Type headers were either duplicated (more than one sent) and/or the default post header value ('application/x-www-form-urlencoded') was being sent in all cases. This update corrects that behaviour when ext-basex is used.

It is now possible to use traditional Observable syntax for setting global httpStatus handlers: