Queuing ajax calls to ASP.NET WebApi Controllers

Objective To halt processing of subsequent ajax calls after one causes an error. Why Any actions related to a similar set of data (or concept) will all go through the same queue. This way if something falls over during processing of any given request, halting the processing of further requests should help not worsen things,Continue reading “Queuing ajax calls to ASP.NET WebApi Controllers”

Capturing client side JavaScript errors for later analysis

We’re getting close to pushing an application to a larger set of test users, and we’ll be interested in what happens when a larger variety of machine configurations (browsers and operating systems) and of course user actions encounter errors. We started with simply catching any server side errors, and log them to a single databaseContinue reading “Capturing client side JavaScript errors for later analysis”

Unit Testing JavaScript methods that contain jQuery ajax calls

Objective Unit test a JavaScript method which contains a $.ajax() call. Using QUnit. Details This was supposed to be a simple task, and if I didn’t have a few (now) obvious faults in my JavaScript code, it would have been completed more quickly. I have gone through several answering my own StackOverflow questions on theContinue reading “Unit Testing JavaScript methods that contain jQuery ajax calls”

Tweaking a VS2010 plugin to run JSLint in the command line

We’ve gone to some lengths at work to automate, and have a continuous delivery style pipeline for all things build and deployment related. It’s well on its way, but not ‘perfect’ yet. Maybe perfection isn’t attainable, or maybe when you have a red button on the desk that when pushed does *everything*. None-the-less aiming forContinue reading “Tweaking a VS2010 plugin to run JSLint in the command line”

AutoSave Form Fields using jQuery – .change(), focusout() and the deferred .when() functions

I have been prototyping some general approaches, some new functionality, and other various concepts, all part of how a larger system will work. After seeing some interesting and nostalgic things being done with jQuery, it gave me an idea for an approach that may be suitable to achieve some delayed asynchronous actions. Thanks to AaronContinue reading “AutoSave Form Fields using jQuery – .change(), focusout() and the deferred .when() functions”

Using jQuery Templates to .appendTo() an <option> on a <select> list via .render()

I couldn’t find a good example that shows how to achieve this, so I thought I would quickly outline the process along with some “gotchas” I encountered. First, an outline of the technology/components/elements I’m talking about: Templates is the Microsoft proposed templating solution for jQuery. This library can be obtained from github. I want toContinue reading “Using jQuery Templates to .appendTo() an <option> on a <select> list via .render()”