Wednesday, November 11, 2009

jQuery presentation and XMLHttpRequest.status problem



Last night I went to a VBUG event (at Anteo, Smithfield, London), it was really good presentation giving a whistle stop tour of jQuery.

You see the George Adamson's slide show at:


I am big fan of jQuery, principally as it:
1) It simplifies working with JavaSript, DOM, CSS, HTML
2) Is completely cross-browser (I haven't seen or heard of many browser specific problems so far)
3) It has Microsoft endorsement. I suspect script.aculo.us is absolute fabulous product, but as I am not a front-end UI specialist, I just want to learn how to work with one good product and ideally the one which is going to be adopted as the industry standard.
4) As well as being powerful, it is also very elegant and beautiful - I love the clear succinct nature of ASP.NET MVC with jQuery, compare this to the monster ViewState of AJAX in ASP.NET 2.o WebForms.

It was a great presentation and afterwards Nadjib and myself have been working on a niggly jQuery problem: "uncaught exception ... NS_ERROR_NOT_AVAILABLE"

The problem we eventualyl tracks down to trying to read the XMLHttpRequest.status after a jQuery.Ajax().timeout had occurred.

Adjusting our error logging code, so logging of timeout events doesn't refer to the XMLHttpRequest.status has stopped this bug!



No comments: