If you are hand-cranking an AJAX request, you’ll be looking for a Ready State of 4 and a Status of 200. But what other Ready State Codes are there and what do they mean? request.onreadystatechange = function () { alert(“readyState: ” + request.readyState); }; 0. Uninitialized 1. Set up, but not sent 2. Sent 3. […]
Category: Programming
Auto Load Your PHP Classes
In PHP you can create classes to organise your code and represent objects that you want to pass around. This has long been a feature of other languages and was a fundamentally important step forward for PHP. There was one thing, though, that I didn’t like about PHP classes. If I wanted to instantiate a […]
“The specified directory service attribute or value does not exist” If you’ve come across this problem while trying to use Active Directory, you may well be dancing the double-hop. This issue can occur when you switch on “Integrated Windows Authentication” in IIS and then try to get some information from Active Directory for the logged-in […]
JavaScript and Noisy HTML
I was answering a question on a popular coding forum and it once again highlighted the age old problem of terribly bad JavaScript. This was the HTML code in question: <a id=”image1″ href=”#”><img src=”image.png”></a> And there was a bit of JavaScript adding an onclick event to the anchor tag. An innocent looking example. An anchor […]
JavaScript Namespacing
This is just a quick article to demonstrate a quick bit of JavaScript namespacing. Why would you do this? Well, this allows you to put functions and variables inside of an identifier. It acts like a “box of stuff” and prevents variable and function name conflicts. It also supplies a neat way to organise and […]
TransactionScope and WCF Services
The problem I encountered was that, while I had started a TransactionScope in my calling method (and could even see a current transaction in my services) – an error in a second WCF service call was NOT rolling back the changes made in a previous WCF service call. The behaviour was as if each service […]
Revised, July 2014. I have no idea what became of this product – I think it got rolled into a premium version of the Expression suite, but can’t find any references to it. Original article below… Microsoft have just released a really cool new tool for comparing websites in different versions of the Internet Explorer […]
HTML5 Browser Test
Revised, July 2014 – Please see my update on dropping the HTML5 shim. Having managed to get the HTML5 website working in all the popular browsers, I ran a test on a larger number of browsers and operating systems with the following result: If you are running the latest version of any major browser – […]
Fenton JavaScript Ethos
When JavaScript was first created (hurriedly) by Brendan Eich, the idea was to allow people to add a bit of interaction to a web page. Since its inception, JavaScript has grown into a massive part of the Internet and, like all technologies, it has sometimes been used in a bad way. Here’s the thing about […]
Google Uses Image Sprites
I happened be using the worlds most popular browser (sic) and I noticed a strange appearance on Google… If you look really closely, below the logo there are three strange lines. I very quick investigation revealed the result, which is the use of sprites on web pages. A sprite is, essentially, all of the images […]